How do i make a game like:Wait for 4 hours to leave a room - Roblox
If anyone can give me the script it’d help.
How do i make a game like:Wait for 4 hours to leave a room - Roblox
If anyone can give me the script it’d help.
You can actually leave anytime you want in that game. There is no way to prevent a player from leaving a game.
If i misunderstood what you’re trying to achieve, please let me know.
No, its basically your stuck in a room for a certain amount of hours till you can get out which i mean a part turns off cancollide after the player stays active ingame for a certain time
You can add a local script to each player that counts to x amount using a for loop.
For example if you wanted to keep the player in the room for 1 minute you would do
for i = 60,0,-1 do
textbox.text = i
end
door.CanCollide = false
i’m not much of a scripter guy, so there may be a mistake.
wait(4*60*60)
workspace.Door.CanCollide = false
is it a local script?, and where do i put, i’m not much of a scripter guy i’m Builder.
To make a game like the one you are talking about , first you need to make a timer. I can give a simple example of a countdown script using “For Loop” Here is a simple example :
for i = 59,1, -1 do
print ("Time Left : "…i)
wait(1)
end
I made Print () for an example (I used seconds, but for hours and minutes the same principle is used only you need to add the if operator . You will of course do as you like.
Next, make a function in which further actions will occur at the end of time.
Local script in StarterPlayer → StarterPlayerScripts would work.
(post deleted by author) ᅟ ᅟ ᅟ