script.Parent.ClickDetector.MouseClick:Connect(function() script.NoobClick:Play() game.Players.PlayerAdded.leaderstats.Money.Value = game.Players.PlayerAdded.leaderstats.Money.Value +1 end)
The error is leaderstats is not a valid member of RBXScriptSignal - Server - ClickScript:5
The problem is that game.Players.PlayerAdded
is an event signal not an object. Altougth to get the player use the argument that is given by the MouseClick event.
Example of this would be:
script.Parent.ClickDetector.MouseClick:Connect(function(player) -- Code here end)
Also, you can increment values easier by using the += sign.
Example:
local a = 0 a += 1 -- Var a will now be 1 because this added 1 to the number a += 4 -- Var a will now be 5 because this added 4 to the number
Full Script:
script.Parent.ClickDetector.MouseClick:Connect(function(player) script.NoobClick:Play() player.leaderstats.Money.Value += 1 end)