How would I make the player in game get 120 rubles per 2 minutes? (LeaderBoard please btw)
I would be happy if anyone helped!
thanks!
How would I make the player in game get 120 rubles per 2 minutes? (LeaderBoard please btw)
I would be happy if anyone helped!
thanks!
game.Players.PlayerAdded:Connect(function(player)
If player then
Local folder = instance.new(“folder”)
folder.Parent = player
Local rubles = instance.new(“intvalue”)
rubles.Parent = folder
rubles.Name = (“rubles”)
while wait(120) do
rubles.Value = rubles.Value + 1
End
End
end)
Leadder board? Not quite what exactly what i wanted sir.
You would also wait 120, not 2. Wait uses seconds, not minutes.
Have a while loop and wait about the seconds in 2 minutes. Inside the while loop, increment the player’s rubies by 120.
I fixed it my bad I forgot how to make leaderstats I needed to check my game.
while true do
wait(120)
Players = game:GetService("Players")
for i, player in pairs(Players:GetPlayers()) do
player.Leaderstats.rubles.Value = player.Leaderstats.rubles.Value + 120
end
end
thank you this worked ! ![]()