Judging from the clickdetector part, its safe to say you put the local script in workspace. That is plain wrong. local scripts cannot work outside the localplayer, or the character of the local player.
Instead, use a server script. MouseClick function has a parameter that helps you here and that parameter is called playerWhoClicked (you can change to player, like you did in your local script, or you can change to something funny like stopusingscriptviewer).
so, put a server script (normal script) at where you put the local script, and in the script, put the following code:
local clickdetector = script.Parent.ClickDetector
game.Players.PlayerAdded:Connect(function(player)
local leaderstats = Instance.new("Folder",player)
leaderstats.Name = leaderstats
local stickvalue = Instance.new("DoubleConstrainedValue",leaderstats)
stickvalue.Name = Sticks
stickvalue.MinValue = 0
stickvalue.MaxValue = 1e303
end)
clickdetector.MouseClick:Connect(function(stopusingscriptviewerdumbo)
local stickvalue = stopusingscriptviewerdumbo.leaderstats.Sticks.Value
stickvalue = stickvalue + 1
also, local Character and local Humanoid was useless since you didn't even use the humanoid or character.
lemme say this again. **Don't use local scripts, use normal scripts, or else this will not work.
**
2 comments
can you show the errors in the dev console (if there is any)?
actually nvm i think i see the problem