How to freeze everything in Localscript?

When my player touches a portal, he is teleported to another map.
But while TeleportService:TeleportAsync is not completed, the 3D area is still showing and the character appears moving, in addition to other animations that are in place.
I would like to freeze all these animations in LocalScript before teleporting.
How do I do that?

1 Like

dont get the question, i assume u meant humanoid animations, have u tried simply stopping the animations before u use teleportasync?

for index, animationTrack in pairs(humanoid.Animator:GetPlayingAnimationTracks()) do

or if you mean freeze them without stopping then animationTrack:AdjustSpeed(0)

once again, i dont get ur question so feel free to elaborate more if i misunderstood the topic

Within my 3D scene, there are several things moving around, some controlled within RunService.RenderStepped, others controlled within individual scripts (e.g. some vehicles), in addition to the players.
As I said, currently, when the player touches the portal, there is a brief gap where the teleport hasn’t started yet. In this, all these animations that I mentioned above, keep moving.
I would like to know if there is any specific instruction to freeze the entire workspace at once.
Because if I have to analyze each script with each animation and adapt it there, that would be a lot of work.

I think the only way would be to manually freeze everything. If it were me I’d just throw up a loading screen or something like that to remove the problem entirely


I found a simple way to freeze everything in Localscript:

for _, Item in pairs(game:GetDescendants()) do
	if Item:IsA('LocalScript') then
		Item.Disabled = true
1 Like