the script keeps crushing at line 5 " if player.leaderstats.Gold.Value " and this is a local script in a textbutton in a frame in a Screen Gui in the Starter GUI
can you explain me the problem with my script.
local button = script.Parent local player = game:GetService("Players")
button.MouseButton1Click:Connect(function() if player.leaderstats.Gold.Value >= 100 then player.leaderstats.Gold.Value = player.leaderstats.Gold.Value + 100
game.ReplicatedStorage.Tools.SpeedCoil:Clone().Parent = player:WaitforChild("Backpack")
end
