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