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.
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)