Basically what I wanna do is that I’m making a custom Nextbot but I want to check if its within the persons camera or view. I have found a temporary solution but it requires you to look directly at it, I want it to be when it enters your view and then does something. How would I be able to pull this off?
1 Like
This code should get the angle between the players head’s look vector and the players head’s look vector if they were looking directly at the monster in degrees.
local Angle = math.deg(math.acos(PlayerHead.CFrame.LookVector:Dot(CFrame.lookAt(PlayerHead.Position, EnemyHead.Position).LookVector)))
1 Like
I think I found my solution the method " GetPartsObscuringTarget" helps quite well. I just checked if it returned any parts and if not its shown on the players screen.