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)

1 comment
Get rid of line 6, then change line 8 to "cash.Value = cash.Value - 10"