How can I see if a player is looking at a specific model?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    What I’m trying to do is have a model follow the player which I am achieving by:
			while true do
					Phantom1:MoveTo(Player.Character:FindFirstChildOfClass("Humanoid").Torso.Position - Vector3.new(5, 0, 0))
				wait(1)
			end

Although, I’m having trouble finding out How I make a sound (jumpscare) play when the player looks at the object for the first time. The while loop is in a Server Script.

I’ve tried raycasting but honestly I’m not sure If I was doing it correctly as I’m new to raycasting. Any suggestions?

You could check the objects position on the client periodically with camera:WorldToScreenPoint(position) which returns a boolean of whether the position is on the screen or not, and the position of the object on the screen.

IsOnScreen, Position = camera:WorldToScreenPoint(position)

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.