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

Is there a way to make a Pause Mechanic?

Can you make a pause mechanic? Like once you keypress, a GUI pops up and stops everything from running. Then when you keypress again, it unpauses the game and everything starts running again.

The main thing I need to know is that can you stop all assets on a simple keypress?

1 comment

0

I might edit this for a few reasons...for most of the professionals to understand what I am trying to go for. Instead of a poor man begging for help.

2 answers

✓ Accepted answer

You can't. You'd have to freeze the game, like anchor the body parts of ALL characters. So they didn't move.

1 comment

0

yea

You can pause the game, technically.

If you want to, you'll have to rewrite all of your code in your game with an if statement determining whether or not the game is paused.

So, to do this, you would write this following piece of code and slip it into whatever needs to be paused.

if workspace.Paused.Value ~= true then
--Your code here
end

To actually pause the game, you'll want to create a textbutton, or image button, whichever one you prefer. After that, you'll want to create a remote event and then a server script, that flips the value in workspace on whenever the aforementioned event is fired.

I can create an example place of this if you'd like to work off of something. :)

1 comment

0

Please create an example. I am trying to do when keypress, the player stops walking, and all of the enemies are anchored.

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