Hiya! I’ve been wanting to make a top down camera script and it’s been pretty simple so far but I hit a roadblock and that is that I need to only rotate the players humanoidrootpart on the Y axis but using CFrame.LookAt it’s rotating to look at the mouse on all axis.
The player rotation code:
RS.RenderStepped:Connect(function()
camera.CFrame = (char.HumanoidRootPart.CFrame + offset) * CFrame.Angles(math.rad(-90), 0, 0)
char.HumanoidRootPart.CFrame = CFrame.lookAt(char.HumanoidRootPart.Position, mouse.Hit.p) -- rotation on all axis!
end)