How to make body position move relative to character

Hello! I have been making this wall climbing system, and I think I have a good idea on what to do however theres one problem. I use bodyposition to move the character and it works only on some angles. I want the bodyposition to move relative to the right of the character but I have no idea on how to accomplish this. I have tried messing around with positions and such but I could come to no conclusion.
Here are some videos I took of the problem.

https://gyazo.com/6986e9bba862e375ee9165d3fa4259e6

https://gyazo.com/994a7b40662bd0c43101666795fe2050

function leftclimb()
	if plr.Character:FindFirstChild("Climbing").Value == true then
		local bp = plr.Character:WaitForChild("HumanoidRootPart"):FindFirstChild('BodyPosition')
		left = true
		repeat
			bp.Position = bp.Position - Vector3.new(0.4,0,0)
			wait(0.05)
		until plr.Character:FindFirstChild("Climbing").Value == false or left == false
	end
end

i would use CFrames. Because CFrames have direction vectors you can use to move characters left or right.
CFrame.LookVector for the forward direction
CFrame.RightVector
CFrame.UpVector
you can set them to negative to get the opposite directions

How would I use CFrames with body position? Excuse me if this is a stupid question.

You can use the players character model. Models have a function for getting and setting the CFrame of its primary part.
Character:GetPrimaryPartCFrame()
Character:SetPrimaryPartCFrame( CFrame)

I understand that, but body position has no cframe property, only position. By body position I meant bodymovers btw.

You can do CFrame.Position to get the resulting position you want

2 Likes