Making a npc look at the player but only in the x axis

how would i make a npc look towards something ( not necessarily the player) but only on the x axis?, i mean, let’s say that the object that the npc is tracking, is above his head, then the npc will try to look at it, so i need to lock it on the x axis , i am using Heartbeat for this, but how would i do it?

2 Likes

Use CFrame.LookAt and when you’re building the target parameter don’t set the other axis

3 Likes

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