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.
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).
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.