rot=Vector3.new(mouse.Hit.X,0,mouse.Hit.Z) p.Character.HumanoidRootPart.CFrame=CFrame.new(p.Character.HumanoidRootPart.Position,rot)
How can I fix it to look straight?
Nevermind I found the answer
rot=Vector3.new(mouse.Hit.p.X,p.Character.HumanoidRootPart.Position.Y,mouse.Hit.p.Z) p.Character.HumanoidRootPart.CFrame=CFrame.new(p.Character.HumanoidRootPart.Position,rot)