When tweening HumanoidRootPart while it's welded, my character spins and I have no idea why

Ok, so I was working on my ledge climbing system, and I encountered a little problem when I tried to make a movement system, like right and left movements. So whenever I try to tween the HumanoidRootPart to the side my character starts spinning for no reason but the HumanoidRootPart still does the right movement. I kinda need help.

Here is a little video of my problem :

And here is my code :

local function moveRight()
	print("MovingRight!")
	local tween = ts:Create(hrp, TweenInfo.new(1, Enum.EasingStyle.Linear), {Position = hrp.CFrame.Position + hrp.CFrame.RightVector})
	tween:Play()
end

Also I welded the hrp to the part with a WeldConstraint.

So yeah if anyone knows what the problem is then please help me.

Applying the Position of the HumanoidRootPart will Offset it from the Character, so try just using CFrame

1 Like

oh ok I didn’t know that ty, but how could I move it while not moving the part with it

I’m guessing the hrp.CFrame.RightVector is the one that is making the bug because the RightVector is the component of the CFrame’s orientation (according to this page CFrame | Documentation - Roblox Creator Hub).

1 Like

Oh really? I thought that it was only moving the part to the right or left depending on if it’s negative or positive but ok thank you as well for this info.

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