Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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

✓ Accepted answer
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)

2 comments

0

Thanks!!!

0

No problem

This discussion is preserved as it was. New answers, comments, and votes are closed.