Good day all!
In my game that I am currently making, people will recieve 20EXP every 5 minutes they spend in the game, but I am having a bit of a wobble with this.
I have my leaderboard script, which works a-okay! But I will link it down here anyways (It has a saving system in it as well.):
local DataSore = game:GetService("DataStoreService") local ds = DataSore:GetDataStore("CashSaveSystem") game.Players.PlayerAdded:connect(function(player) local folder = Instance.new("Folder", player) folder.Name = "leaderstats" local EXP = Instance.new("IntValue", folder) EXP.Name = "EXP" EXP.Value = ds:GetAsync(player.UserId) or 0 ds:SetAsync(player.UserId, EXP.Value) EXP.Changed:connect(function() ds:SetAsync(player.UserId, EXP.Value) end) end)
That's the leaderboard script with a save system in it.
And after that, I've been trying to make the script that gives the player 20EXP every 5 min. I will C+P what I have so far down here >> v
while true do wait(300) --Something Idk end
That's all I have for that bit. Can someone please help me with this?
Many thanks.
-Harrydamastr.