Player must play game for specific amount if time before joining team help

Hello forumers, I’ve been developing a game revolving around the ocean. There is a “police” team. I don’t know where to start but I want a player to have 45 minutes of playtime before their ability to join the team. All tips are greatly appreciated.

Thanks - secretajnz

1 Like

Have it so when a player first joins, you upload to datastore when they have joined using tick(). Note that it would only operate if the player is new to the game.

And then, for the second part, if they wanted to switch to police team, I suggest grabbing data from the datastore, and checking it by doing taking the time that they first joined at, and subtracting that by current time.

(Note that tick() is in seconds, starting from 1st of January of 1970.)

Addition to the second part, add a cooldown so that they can’t spam, and overload your datastores, and potentially slowing down gameplay.

2 Likes