Rotating the player in the Camera's Direction Makes the Player Go Down

I rotate the player when they dodge based on the Camera’s LookVector. However, when I set the CFrame it also makes the player touch the ground again. So if the player was jumping it would create this weird glitch. And if the player is walking then it moves the player back a little.
Here’s the Video:

Local Script:
local camera = workspace.CurrentCamera
local lookCam = camera.CFrame.LookVector

local runService = game:GetService("RunService")

runService.RenderStepped:Connect(function ()
	lookCam = camera.CFrame.LookVector

Server Script:
hrp.CFrame =, * 9999, hrp.Position.Y, lookcam.Z * 9999))

I also have a remote that sends the info to the server. I just need to make the rotation smoother and if the player is mid-air not to make them go back to the ground.

1 Like