Is there anyway to make timestop in roblox studio?
1 Like
Orbular3
(Orbular3)
January 18, 2022, 10:26pm
#2
Not with a simple one-line script
I assume you mean pausing or stop updating physics in a running experience. There is no supported API for this. There are hacky solutions that might be able to accomplish what you are after, such as anchoring everything. Expect a lot of complications related to client controlled objects and distributed physics.
Physics is built into the Roblox engine code, so it’s not accessible to projects like this.
PokeDB99
(PokeDB)
January 18, 2022, 10:27pm
#4
This could possibly help as an explantion.
The time stop concept is really dependent on your game and it’s features, but i’l have a small list of tasks that generally apply to 90% of game styles.
first we’l need to freeze every part (obviously) by anchoring them, but then un-pausing would be a problem, because many parts are supposed to stay anchored (like the ones that already were, static map parts, barriers ect.), so we’l need to iterate through every workspace descendant (most likely exclude player/players) and save their state of “Anchored” before they are frozen, then freeze them, so when the time comes to un-freeze you know which ones were anchored before the freeze, so you keep them, the rest - unanchor.
same thing with velocity - parts that are moving or falling would freeze at first, but unfreezing them would start their momentum/velocity at 0 and they will slowly fall, you’d most likely want to save the parts velocity (or Primary parts if it’s a model, DO NOT save every parts velocity under a model, only the center/primary part) in a table, then apply them after un-freeze.
You can lower gravity for extra effect (for the player feeling the frozen time more, just an extra if it doesn’t affect the gameplay that much)
the rest is on you, npc behavior, canceling all damage / health lost, and all the other features your game has, i can’t predict them. I might have forgotten a few things but hopefully someone corrects / adds them.
(also, make sure all this is happening on SERVER side, before anchoring set parts owners to be the server, later when un-freezing put it back to automatic, we don’t wanna glitch physics)