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

How to detect if player is behind a part/wall?

Asked by 6 years ago

I need a basic script that checks if a player is behind a wall/part. Is it possible? I know it is using rays, but I'm not really experienced with rays.

0
If you follow this tutorial on raycasting, it'll teach you how to use rays. It's not specific to your question but it should help answer it. http://wiki.roblox.com/index.php?title=Making_a_ray-casting_laser_gun Troidit 253 — 6y
0
What do you mean behind a wall/part Wafflecow321 457 — 6y
0
You can also use WorldToScreenPoint to detect if the player is within the bounds of the screen, but you'll still need the raycasting to determine if they are behind a part or not. mattscy 3725 — 6y

1 answer

Log in to vote
-1
Answered by 6 years ago

Well what you could do is, let's say you have a wall, and behind it insert a invisible block with cancollide false and when a player touches it, it activates a function. Ez

Ad

Answer this question