NPC going into the ground

I’ve ran into an issue with a feature I’m making. What I’m trying to do is make an NPC look in the general direction a player is going if they’re in a certain range. However, when this is done, the NPC goes into the ground for some unknown reason. I haven’t been able to really find a good solution for this. Any help would be appreciated

For reference:

Here’s the code for it:

    for _, v: Model in workspace:GetChildren() do
        if v:IsA("Model") and v.Name == "Dummy" and v:FindFirstChild("HumanoidRootPart") then
            local ROOT: BasePart = v:FindFirstChild("HumanoidRootPart")

            if (HumanoidRootPart.Position - ROOT.Position).Magnitude > 15 then

            TweenService:Create(ROOT,, {CFrame = CFrame.lookAt(
      , 0, ROOT.Position.Z),
      , 0, HumanoidRootPart.Position.Z)

most likely happening due to you setting the NPC’s Y position to 0:, 0 <== Here, ROOT.Position.Z),, 0 <=== Here, HumanoidRootPart.Position.Z)

Try setting it to HumanoidRootPart.Position.Y instead.