Hello!
So lately, I’ve been making a prison game like entry point which the guard suspect you on every illegal actions you make. The problem is that
It is facing in wrong direction!
Code:
local player = getClosestPlayer()
if player then
local is_in_front = NPC.PrimaryPart.CFrame:ToObjectSpace(player.PrimaryPart.CFrame).Z < 0
if is_in_front then
local unit = -(NPC.PrimaryPart.CFrame.p - player.PrimaryPart.Position).unit
neck.C0 = cframe0 * CFrame.new(Vector3.new(0, 0, 0), unit)* CFrame.Angles(math.rad(unit.Z), -math.rad(NPC.PrimaryPart.Orientation.Y),0) -- CFrame.lookAt(script.Parent.Head.Position,Vector3.new(player.Head.Position.X,script.Parent.Head.Position.Y,player.Head.Position.Z))
end
end
wait()
Alright the problem is about the rig. I tried with both moon animator rig and the roblox default rig it seems to work on the default rig but not the moon animator rig. I think its because of the weld I THINK. Any way thanks for helping me!