Detecting when player looks at specific player

  1. What do you want to achieve? Keep it simple and clear! I got bored and wanted to make p e a n u t (SCP-173). If you’re wondering what that is, it’s basically just weeping angels but it looks different. Obviously, when wanting to make something that moves when no one is looking, you gotta see if the player is looking at the statue. That’s where the issue is. PS: I made it so it checks if the head is looking since it looks weird if the player is not facing it yet is looking at it with their camera.

  2. What is the issue? Include screenshots / videos if possible! I marked it so that the test dummy is detected as a player btw. The issue is that even if the dummy is looking at the player, the player can move. However, when the player is looking in the same direction as the dummy, they can’t move.

  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? I looked everywhere.

help.rbxm (22.5 KB)
(set both model parents to game.Workspace)
(walk onto the button to morph)

2 Likes

I’ve decided I’m gonna try using rays looking 90 studs in front of the player head and checking if it lands on a body part

Although it isn’t completely accurate (for example jumping makes it think they arent looking for like half a second), it’s pretty good.