So i want to make a npc to follow your head with necks
but i want it to be r6 and for some reason it gives the result i want only in r15
how would i make it have the exact same result as r15 does?
this is the video of the demonstration
R6 Script
local neck = workspace.Dummy2.Torso.Neck
local NPC = workspace.Dummy2
local cframe0 = neck.C0
while true do
task.wait()
local player = workspace:WaitForChild("nikos300") -- i know just for testing
if player then
local unit = -(NPC.PrimaryPart.CFrame.p - player.HumanoidRootPart.Position).unit
neck.C0 = cframe0 * CFrame.new(Vector3.new(0, 0, 0), unit) * CFrame.Angles(0, math.rad(NPC.PrimaryPart.Orientation.Y), 0)
end
end
R15 Script
local neck = workspace.Dummy.Head.Neck
local NPC = workspace.Dummy
local cframe0 = neck.C0
while true do
task.wait()
local player = workspace:WaitForChild("nikos300") -- i know just for testing
if player then
local unit = -(NPC.PrimaryPart.CFrame.p - player.HumanoidRootPart.Position).unit
neck.C0 = cframe0 * CFrame.new(Vector3.new(0, 0, 0), unit) * CFrame.Angles(0, math.rad(NPC.PrimaryPart.Orientation.Y), 0)
end
end
I dont care if the head looks behind the npc