Hey Developers!
I got a question.
Let’s say we have a red part in the workspace.
How to detect that if the player is staring at the part?
I wanted to make it like whenever a player looks at that part it decrease the player’s health.
Even a small tip is appreciated!
Thanks for reading!
1 Like
You can do this with worldtoscreenpoint I believe. Camera:WorldToScreenPoint you can read about it here.
local _, inScreen = Camera:WorldToScreenPoint(thing.Position)
^ is how you would do it as a starter.
3 Likes
Thanks! I’ll mark this as Solution! It helped a lot!