How to make R6 head/npc look at my character

  1. What do you want to achieve? Keep it simple and clear!

Simply, how do i make it so that the r6 npc/character’s head looks at my character’s humanoidrootpart?

heres an image giving context to it:

3 Likes

LOL nice image example!

I could make an over-complicated script for you but someone already beat me to it. If you have any questions feel free to ask them here but I think this should suffice!

how do you make it on r6 i think it only works on r15

Did you test it? It seems like it’s only rotating the model’s primary part, which should also work on R6. But if it doesn’t work for you, there’s this forum post that could help you solve your issue.

You could consider using the new IKControl for this :smiley:

They are very simple to setup. Here is an example localscript to implement it:

-- Localscript in StarterCharacterScripts
local Character = script.Parent

local Noob = workspace.Noob -- Your R6 Noob

local LookAtIK = Instance.new("IKControl")
LookAtIK.Type = Enum.IKControlType.LookAt
LookAtIK.Target = Character:WaitForChild("Head")
LookAtIK.ChainRoot = Noob:WaitForChild("Head")
LookAtIK.EndEffector = Noob:WaitForChild("Head")
LookAtIK.Parent = Noob:WaitForChild("Humanoid")
LookAtIK.Enabled = true -- Enabled when you are close enough

Hopefully this works out for you and if you have more questions, let me know! :smiley:

3 Likes

bro you nailed it with that character lol :rofl:

1 Like

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