Whenever I run the game the script says "attempt to index local 'Player' (a nil value)". Anyone know why it's not working?

script.Parent.MouseButton1Click:Connect(function(Player)
	local leaderstats = Player.leaderstats.Money

Thanks!

3 comments

0

You're doing lots of things wrong, 1) never change a stat client-side, (enable FE!!), 2) mousebutton1click doesn't have any args, so you need to get the player like this 'game.Players.LocalPlayer'

0

I fixed it already.

0

then add a [SOLVED] or so to the title...