How to make a safe zone?

I’m actually kind of curious how they create those safe zones? while searching some reference in other horror roblox games this safe zones don’t usually have force shield, how did they create those safe zones so the npc (killers) would not come and attack to the safe zone?

2 Likes

I use a .Touched event for my safe zone, and set the humanoid’s health and maxhealth to math.huge.

1 Like

Turn off aggro on the player when they are in the safe zone and make the safe zone solid for npcs but not players just in case the npc gets pushed around somehow

1 Like

If you change a property on a specific player’s machine using a localscript, that property won’t replicate to the server or to the other players. You can keep a specific player out of a safe zone by making the part collidable only on that player’s machine.

3 Likes

Use CollisionGroups, so only normal players will able to pass through wall.

2 Likes

i guess id create variable inSafeZone that affects the npc pathing when recognizing players. when they hit the spawnzone it would be turned true/false, you could check if theyre touching the zone 0.5s after touch event to verify if they went in/out of it with GetPartsInPart

for player-player interaction you can make similar variable canBeDamaged that affects weapons

oh yeah you could also have a boolean attribute inside players for that, then instead of updating a variable it could update the attribute

2 Likes