How to detect if a player is standing in front of a part?

Hi there! I am making a mirror, it’s done, but a few things are still remaining such as only displaying the copy if a player is in front of the mirror, I don’t know how I would achieve it. Here’s a picture reference:


How would I detect if the player is still in that area of the mirror?

Thanks for any help! :love_you_gesture:

Use Region3 to make a region infront of the part then detect if a player enters it

then if u want to make sure the player infront of the wall is lloking at the wall u can get the look vector of camera if its in first person or get a head vector or sumn and make sure its facing the right direction when in the region

A sort of Field-of-View system is another option. Here’s a video tutorial on the subject:
Vector3 Dot Product: Calculating NPC Field of View (Roblox Studio)

1 Like

oh yeah i didnt make that clear did i that it could be done as a field of view by adding parameters to what the look vector value is BUT ANYWAY @XXgamerisaliveXx i think a far more efficient way would be ray cast forward from te head and detect if its the wall that the ray is hitting then there ya go