Hi, so I am learning to script and I was playing around with leaderboards. I do not know a lot about scripting, but what I want to do is: Every second I will get 1 point into "Days", which works fine, but after 5 seconds it will reset. This also works fine the timer always resets at 5 and goes from the beginning, but what I am trying to do is for each 5 days it passes I would like to get + 10 "Cash" but it is not giving it, why is that?
game.Players.PlayerAdded:Connect(function(player)
local stats = Instance.new("IntValue", player)
stats.Name = "leaderstats"
local points = Instance.new("IntValue", stats)
points.Name = "Days"
local money = Instance.new("IntValue", stats)
money.Name = "Cash"
while true do
points.Value = points.Value + 1
wait(1)
if points.Value >= 5 then
points.Value = 0 and money.Value == money.Value + 10
end
end
end)
Thank you!

4 comments
You dont need 2 equals (==) when your not using an if statement simply remove the 2 equals
any errors?
Right
Thank you, but now I have another glitch what happens is that it goes to day 5 and then it skips to 11 and nothing goes up anymore.