function OnTouch(hit)
torso = hit.Parent:FindFirstChild("Torso")
head = hit.Parent:FindFirstChild("Head")
leftarm = hit.Parent:FindFirstChild("Left Arm")
rightarm = hit.Parent:FindFirstChild("Right Arm")
leftleg = hit.Parent:FindFirstChild("Left Leg")
rightleg = hit.Parent:FindFirstChild("Right Leg")
humanoid = hit.Parent:FindFirstChild("Humanoid")
if (humanoid ~= nil) then
torso.Anchored = true
leftarm.Anchored = true
rightarm.Anchored = true
leftleg.Anchored = true
rightleg.Anchored = true
head.Anchored = true
humanoid.Health = humanoid.Health - 5
wait(0.1)
humanoid.Health = humanoid.Health - 5
wait(0.3)
humanoid.Health = humanoid.Health - 5
wait(0.5)
humanoid.Health = humanoid.Health - 5
wait(0.7)
humanoid.Health = humanoid.Health - 5
wait(3)
if (humanoid ~= nil) then
torso.Anchored = false
leftarm.Anchored = false
rightarm.Anchored = false
leftleg.Anchored = false
rightleg.Anchored = false
head.Anchored = false
end
end
script.Parent.Touched:connect(OnTouch)
That's what i have so far I'm trying to make a temporary freeze script. One that keeps that in place for just 5 seconds

2 comments
Please use the lua formatting. To do this, edit your question by going to the right and click on edit, then a textbox should appear, click the Lua Symbol above the textbox, and insert your script into the lua box.
fixed it