I would like to know how to give player points every 24 hours, and so, even if the player is offline, the only thing needed would be to login to collect those points for the every day login bonus, but if u miss that day and login into the game the day after that, then u wont recieve the reward for the last day, am thinking put it to a function like: give player 100 points wait(24 hours) then if player hasnt collected the bonus yet, then dont restart the timer, keep it at that point, so that pkayer logs in and then timer moves again... if u know wat I mean... anyways, heres my script:
local stats = {"Points", "RW", "TDD"} game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "leaderstats" for _, stat in pairs(stats) do local sv = Instance.new("IntValue", leaderstats) sv.Name = stat end end) while wait(3600) do for _,Player in pairs(game.Players:GetPlayers()) do if Player:FindFirstChild("leaderstats") then Player.leaderstats.Points.Value = Player.leaderstats.Points.Value +100 end end end
This isn't really a proper response, so I apologise(I can't comment, so I have to post it as an answer). But I did see a thread and in the comments there, Articulating had said to use something called "os.time". Now, I'm not sure whether that will be of any help or not, but my guess is to use os.time and saving/loading last play time and compare it to the current play time.
But as I said, this isn't a proper response and it may not be of much help, but making it so you can give players points every 24 hours IS possible. Don't give up hope, someone with greater experience should hopefully give you better advice, but hopefully this will give you some sort of help. :)
I do not believe there is a way to do this. At most you can have it so when the join the game they can get 5 points:
game.Players.PlayerAdded:connect(function (player) if player:WaitForDataReady() then local stats = Instance.new("Model", player) stats.Name = "leaderstats" local money = Instance.new("IntValue", stats) money.Name = "Money" player:LoadNumber("Money") money.Value = money.Value + 5 end end) game.Players.PlayerRemoved:connect(function (player) local stats = player:findFirstChild("leaderstats") local money = stats:findFirstChild("Money") player:SaveNumber("Money", money.Value) end