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

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

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.

3 comments

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

0

What do you mean behind a wall/part

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.

1 answer

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

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