I am making a simple linesman AI which moves on the Z axis and I want the head to face the ball, I have tried using look at but it is somehow messing with the HumanoidRootPart Position and is not going to the waypoints and is basically going backwards, any help is appreciated.
while true do
wait()
local target = workspace.TPS
followPath(Vector3.new(character.PrimaryPart.Position.X, character.PrimaryPart.Position.Y, target.Position.Z))
character.Head.CFrame = CFrame.lookAt(Head.Position, target.Position)
end
workspace.ChildAdded:Connect(function(object)
if object:FindFirstChildOfClass("Humanoid") then
local ik = Instance.new("IKControl")
ik.Parent = object:FindFirstChildOfClass("Humanoid")
ik.Target = workspace.Part
ik.ChainRoot = object.Head
ik.EndEffector = object.Head
ik.Type = Enum.IKControlType.LookAt
end
end)
I have already figured it out didn’t realise the neck joint was in the torso of an R6 character I will probs test it out with CFrame.new to see if it works better