i am making a cash to gold system where if the player get 10,000 cash it would turn into gold. there are no errors but its not turning into gold here is me script:
game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("Folder",player)
stats.Name = "leaderstats"
local cash = Instance.new("IntValue",stats)
cash.Name = "Cash"
cash.Value = 10
local gold = Instance.new("IntValue",stats)
gold.Name = "Gold"
gold.Value = 0
cash.Changed:Connect(function()
player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - 0 -- this takes away the cash
player.leaderstats.Gold.Value = player.leaderstats.Gold.Value + 1
end)
end)

1 comment
when a reputation 100+ says a question is a "request" but it doesn't ask for anything but help on scripting