How to make a player freeze and reset on touch?

How would I make a player freeze and reset when touching a part?

By freeze I mean lose control of moving

1 Like

Easy solution I can think of is to set the player’s walkspeed to 0 and then set their health to 0

1 Like

When you mean freeze you mean forever?
Here’s a simple touch script that when you touch you die. This is FULLY customizable so please don’t report me for giving this person the full script it’s very simple so please no.

Instructions:
Create a default script inside the part
Insert the script below

Script:

script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.Humanoid.Health = 0
hit.Parent.Humanoid.WalkSpeed = 0
end
end)
1 Like

they freeze until they reset.

I’m bad at scripting

1 Like

If you’re just freezing them until they die there is no point they can’t move while they’re reseting.

1 Like
local part = workspace.PartName
part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("HumanoidRootPart") then
hit.Parent.HumanoidRootPart.Anchored = true -- freeze
hit.Parent:BreakJoints() -- reset
end
end)
3 Likes

This shouldn’t work because you’re not defining “part.”

2 Likes

Thanks, I changed some of the scripts to make it work.

1 Like