Climbing System

I am trying to make a climbing system but I couldn’t figure out how to project where the player is supposed to relative to the climbing bar.

Also I have tried projecting the vector (From the climbing tool → part’s position) and the result that I got is somewhat expected but not what I exactly want:

Anyone can help me get the correct position for what I want?

Use the magnitude of the head to the bar and this should help distance issues

How would I use the magnitude to solve it?

solved it by using a different approach:

local prt = script.Parent
local c = workspace.c

--[[
a*k=b
a-1 * b = k
]]

function findK(a,b)
	local k = a:Inverse() * b
	return k
end

local obj = findK(c.CFrame,prt.CFrame)



local relative_Right_Scaled = c.CFrame.RightVector * obj.X

prt.Position = relative_Right_Scaled + c.Position

I Used the Part’s Position relative to Climbing bar then multiplied the X value of the relative position to the rightvector of the Climbing bar space

I tried using the method :ToObjectSpace but I ended up calculating it manually because I didn’t know how it works.

hope it helps someone.

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