Money reset script will not reset player money why?
01 | local player = game.Players.LocalPlayer |
03 | until player:FindFirstChild( "leaderstats" ).Money.Value > = 7000000 |
04 | if player:FindFirstChild( "leaderstats" ).Money.Value > = 7000000 then |
05 | local m = Instance.new( "Message" ) |
06 | m.Text = "Stats Have Been Reset" |
07 | m.Parent = player.PlayerGui |
10 | player:FindFirstChild( "leaderstats" ).Money.Value = 0 |
11 | script.Disabled = true |
i want this script to reset money if players money is higher then 7 million but this script will now reset players money. please help.
this is a local script in playergui.
there is a leaderboard in the game which works fine.
error: Players.MHaven1.PlayerGui.LocalScript:3 attempt to index a nil value.