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

How do you pause time when for example opening a menu?

I want to slow down time while the player opens a menu and then make the time go to normal speed as soon as the player quits the menu.

I have thought about setting variables for the speed of moving parts however I fell like this is a clumsy solution.

3 comments

0

wait(2) <-- waits 2 seconds

0

Is this a single player or multiplayer game? Because in a multiplayer game it would be very annoying if someone kept their menu open just to troll.

0

you can possibly lower the gravity and all humanoid move speeds

1 answer

i am not exactly sure about what ur asking for, but to pause your code, you could use wait(x) which will cause the script to pause for x amount of second before resuming,

or you could use coroutines

local t=20
print(t .." seconds before")
wait(t) --waits t amount of seconds
print(t .."seconds after")

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