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.
COMMUNITY QUESTION
How to detect if player is behind a part/wall?
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.

3 comments
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
What do you mean behind a wall/part
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.