My character rotates after going moving to another CFrame

I want the player to just go up like this

but when the player goes up the character rotates without me doing anything

I don’t want the character to rotate I just want it to go up
here is my code, please tell me what is wrong with it, and why it makes the character rotate

AutoRotate is off

	local TargetCF =,UpRayCastResult.Position.Y,UpRayCastResult.Position.Z))
					local goal = {CFrame = TargetCF}
					local ti =, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut,0,false,0)
					local Tween = TweenService:Create(HRP, ti, goal)

1 Like

Setting the character CFrame to the a Part CFrame is changing Position and Rotation, so your character is going to look forward the part front side.

Solution 1
Rotate the parts, put the Front side where you want the character look.

Solution 2

local goal = {CFrame = TargetCF * CFrame.fromOrientation(Character.PrimaryPart.Orientation)}
1 Like

I have tried both solutions and have another problem, the character wont move anywhere now

nothing has changed except for this local goal = {CFrame = TargetCF * CFrame.fromOrientation(Character.PrimaryPart.Orientation)} and yet it cant move?

I made the script print the name of the ledge part and it works but I cant go up

Edit: I have fixed the problem, turns out I accidentally deleted important stuff while rewriting the code

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.