Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would i make a player wait a 24 hours before they can apply again?

I made an application center for my friends group and i was wondering how to make the player wait 24 hours before they can apply again?

I have tried datastore but nothing comes to mind.

some of you may say "tHiS iS nOt aN rEqUeSt SiTe?"

I'm just curios and would like to know the script behind this, and i have tried scripting this.

1 answer

✓ Accepted answer

you can do something like this:

local canApply = 1 

--Your Code to do something here
canApply = 0

	If canApply = 0 then
		print("You can only apply 1 time per day")
	wait(86400)
	canApply = 1

Or you could do a method using os.date(Day) Put an IntValue in your script, i called mine Day

I recommend this more than the other

local Day = script.Day
local DayValue = os.date("!*t") ["day"]

if os.date("!*t") ["day"] == Day.Value then
	print("You cant apply twice per day!")
else
		print('SUCCESS')
		--Code
		Day.Value = DayValue
end

Replace the print("SUCCESS") with your code that makes the application work and replace print('You cant apply twice per day!') with the message or whatever you want to show the person that they are not allowed to apply twice per day

2 comments

0

YOU ARE SO SMART OMG

0

np

This discussion is preserved as it was. New answers, comments, and votes are closed.