24 hour cooldown

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I want to a 24 hour cooldown, where a player joins the game, and they can’t join the game if they rejoin the game within 24 hours
  2. What is the issue? Include screenshots / videos if possible!
    I don’t know how to script this 24 hour cooldown in a serverscript sadly.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I’ve tried looking on devforum.roblox.com, but nothing useful…

2 Likes

What you could do is log the time they left the game to a data store. Then, when they rejoin back check if 24 hrs has passed from that said time. If not kick them

You will need to use timestamps by using os.time() and saving it within a datastore and then every time they join negate their current timestamp to the one you saved when the cooldown first started (the one in the datastore) and if its over 24 then kick them.

1 Like

Use datastore for people in the ban and on player removed you would kick him for about 86400 seconds

Or you can do 86400 which is = 24 hours

Thing is, I’ve done too much scripting for the day, so if you could write the code for me, I’ll pay you?

Add me on discord: DivideAndConquere#0001