Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would you make a certain area in which a zombie could not get out?

Asked by 10 years ago

How would you make a area where a zombie cannot get out of it but a survivor could. Im quite a noob at scripting so all help would be appreciated.

1 answer

Log in to vote
0
Answered by 10 years ago
Zombiename = "PUT THE NAME OF THE ZOMBIE HERE"
debounce = true
script.Parent.Touched:connect(function(zombie) --The part gets touched and calls the Zombie
debounce = false
Humanoid = zombie.Parent:FindFirstChild("Humanoid") --Makes Sure it's the zombie
if Humanoid ~= nil and zombie.Parent.Name == Zombiename then
zombie.Anchored = true --Anchors the touched item (The zombie)
wait(10) --Waits 10 seconds before unfreezing it
zombie.Anchored = false
wait(5)
debounce = true --Waits a total of 15 seconds before it can freeze again.
end
end)
0
Thanks!!! NarcassisticCannibal 5 — 10y
0
No problem fahmisack123 385 — 10y
Ad

Answer this question