I want to make a countdown system, countdown starts when you hit the block and if countdown runs out player will go to the another server and other players can’t join your game when game started on the server.
Well, I would start with a script that shows how long a server has been running. I don’t know scripting so I assume you’d have to add functions to where if you hit the block it activates the timer. You’d have to make it end to your specifics though. I don’t do any scripting so idk how well this would be.
You can use a variable to get the starting time, local startTime = time() - this would be a constant value (this function returns the time at the moment it’s used).
And you can use a while loop to create the countdown,
local startTime = time()
local finishTime = startTime + 30 -- this will define the length of the countdown in seconds
while time() < finishTime do
print(finishTime-time()) -- this will visualise the countdown
end
<post-countdown functions go here>