Time Freeze Script

How would I go on about making a script that freezes the physics on the client? Like if a part is falling, I would use CFrame to animate it stopping and freezing mid air, while the client can still freely move around. Take Tower of Hell as an example where you can use the hourglass to freeze time. How would I go on about implementing something like that in my game?

If you are freezing an animation, you use

AnimationTrack:AdjustSpeed(0)

on all of the animation tracks and if it’s CFrame freezing, you can anchor all body parts

-- List of R15 body part names
local r15BodyParts = {
	"Head",
	"UpperTorso",
	"LowerTorso",
	"LeftUpperArm",
	"LeftLowerArm",
	"LeftHand",
	"RightUpperArm",
	"RightLowerArm",
	"RightHand",
	"LeftUpperLeg",
	"LeftLowerLeg",
	"LeftFoot",
	"RightUpperLeg",
	"RightLowerLeg",
	"RightFoot"
}

-- Convert list to a quick-lookup table
local r15PartLookup = {}
for _, name in ipairs(r15BodyParts) do
	r15PartLookup[name] = true
end

-- Anchor R15 body parts in the workspace
for _, part in ipairs(workspace:GetDescendants()) do
	if part:IsA("BasePart") and r15PartLookup[part.Name] then
		part.Anchored = true --Set to false to unanchor all R15 body parts in the workspace
	end
end

There’s also platform stand

local character = game.Players.LocalPlayer.Character
local humanoid = character:WaitForChild("Humanoid")

if humanoid then
humanoid.PlatformStand = true
end

These are just examples. Adjust them as needed. Hope this helps!

2 Likes

So I can’t freeze up all the body parts of the client.

What I want to achieve is for falling parts (like falling Killbricks) to freeze up. How do I do that?

1 Like

I found a solution, thank you anyways!

You need to create a loop through the workspace to find the killbricks and freeze them

for i, v in ipairs(workspace:GetDescendants()) do
    
if v.Name == "Killbrick" and v:IsA("Part") then

v.Anchored = true
    
end

end