How would I make a player freeze and reset when touching a part?
By freeze I mean lose control of moving
How would I make a player freeze and reset when touching a part?
By freeze I mean lose control of moving
Easy solution I can think of is to set the player’s walkspeed to 0 and then set their health to 0
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)
they freeze until they reset.
I’m bad at scripting
If you’re just freezing them until they die there is no point they can’t move while they’re reseting.
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)
This shouldn’t work because you’re not defining “part.”
Thanks, I changed some of the scripts to make it work.