При нажатии на кнопку в консольке выскакивает "value is not a valid member of IntValue". Что делать?
Вот код в scripts:
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Model")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local money = Instance.new("IntValue")
money.Name = "clicks"
money.Value = 0
money.Parent = leaderstats
end)
И вот в localscript:
local plr = game.Players.LocalPlayer
script.Parent.MouseButton1Click:Connect(function()
plr.leaderstats.clicks.value = plr.leaderstats.clicks.value +1
end)