Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to make a ban datastore service have a timer to be un banned?

Asked by 5 years ago

I have made a script to un ban the player after it meets the ban date and it dont seem to work. can i get help? the code i have is

01--//  Variables
02 
03--  DataStore
04 
05local DS = game:GetService("DataStoreService")
06local BanDataStore = DS:GetDataStore("BanDataStoreStudioTest")
07 
08--  Other Variables
09 
10local RStorage = game.ReplicatedStorage
11local BanFunction = RStorage.BanPlayer
12local UnBanFunction = RStorage.UnBanPlayer
13local AdminIds = {261477936, 1, 156, -1}
14local Storage = game.ServerStorage
15local BanFolder = Storage.BanFolder
View all 40 lines...
2
you can store when they were banned by using tick() and then when they rejoin the game, check the current time (tick()) and subtract the time they were banned. this will give you how long they were banned for royaltoe 5144 — 5y
0
thanks royaltoe EnzoTDZ_YT 275 — 5y

Answer this question