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

is it possible to prevent regions from going through walls?

Asked by 6 years ago

Is there a way to prevent regions going through walls? cause I am attempting to make a stealth game, and the NPCs use the region to see if there are players around them, but since regions can go through walls, you could be hiding but an NPC will still see you, please help or recommend other ways I can do this.

1 answer

Log in to vote
-1
Answered by 6 years ago
Edited 6 years ago

Instead of using regions, I would use a beam. http://wiki.roblox.com/index.php?title=API:Class/Beam Then create a script that will detect if the beam is being interrupted, and then check if the obstructing object has a humanoid. If the obstructing object does contain a humanoid, then the script will then follow through with the desired functions of the npc sensing a player.

0
beams dont have a touch.. danielsury06 18 — 6y
Ad

Answer this question