I tried to make it whenever the player clicks the part, their money goes down by 10, it does not go down, what do I do
Script:
local click = script.Parent click.MouseClick:Connect(function(player) local leader = player:WaitForChild("leaderstats") local cash = leader:WaitForChild("Cash") local money = cash.Value money = money - 10 end)
~~~~~~~~~~~~~~~~~ click.MouseClick:Connect(function()
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value -10 --How ever much you want to subtract ~~~~~~~~~~~~~~~~~