Renderstep has delay when trying to turn character

Heyo I have this code in a renderstep (the function isn’t in it but the part under is) and I honestly don’t fully understand how it works so sorry for bad explination, but it changes the players character rootpart and using -1 or 1 I can make them face left or right

function UpdatePos(FacingDirection)
    Modules.CharacterControl.FacingDirection = FacingDirection
    local NewPos = Main.HRP.Position+Vector3.new(FacingDirection,0,0)
    Main.HRP.CFrame = CFrame.new(Main.HRP.Position,NewPos)
end

--| Keep Player Facing Opponent
local FacingDirection = math.floor(Opponent.Character.HumanoidRootPart.CFrame.X-Main.HRP.CFrame.X)
if FacingDirection < 0 then
    FacingDirection = -1 --> facing right
else
    FacingDirection = 1    --> facing left
end
if Main.Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
    UpdatePos(FacingDirection) --> update with new direction
else
    UpdatePos(Modules.CharacterControl.FacingDirection) --> update with current
end

And I’m having an issue where each client their opponent doesn’t instantly turn as you can see from this clip here.


I’ve tried letting the client update both characters positions and also tried doing it on the server, but I keep getting some weird laggy issue which you can see in this clip