I'm trying to make it so the player would gain 1 money every second, but its not looping correctly. This is what I'm using:
local leaderstats = game.Players.LocalPlayer:WaitForChild("leaderstats")
local money = leaderstats.Money
money.Value.Changed:connect(function()
if money.Value < 1000 then
repeat
money.Value = money.Value + 1
wait(1)
until money.Value == 1000
end
end)
money.Value = money.Value - 1
Any help is greatly appreciated!

1 comment
Sorry, but it still doesn't work. I don't know how to fix this...