so i tried to make a system where the player is locked to the y axis of the camera.
RunService.RenderStepped:Connect(function()
local _,rYEE, _ = CFrame.new(RootPart.CFrame.p, workspace.CurrentCamera.CFrame.LookVector * 10000):ToOrientation()
local rXEE, _, rZEE = RootPart.CFrame:ToOrientation()
RootPart.CFrame = CFrame.new(RootPart.CFrame.Position) * CFrame.fromOrientation(rXEE, rYEE, rZEE)
end)
thats my code and thought if thats the best way to do it or theres like better ways since I do think its not the best way.