I was trying to make a script that changes the Value of a variable once an IntValue reached 10 or up. I ran the script and then saw that the output wrote out the error, "leaderstats is not a valid member of Part" Here is script that put out the error and the script associated with the error.
workspace.Wall.Touched:connect(function(player)
Clicks = player.leaderstats.Clicks
if Clicks.Value >= 10 then
end
end)
game.Players.PlayerAdded:connect(function(player)
stats = Instance.new("IntValue", player)
stats.Name = "leaderstats"
Clicks = Instance.new("IntValue", stats)
Clicks.Name = "Clicks"
end)
Another script might need to be included. Please tell me if it does.

1 comment
aw man. it didn't work. do you think that another script needs to be mentioned?