CFrame Rotation

Im making Motor6D Welder Plugin (I know some exists) but when it came to rotation i struggled to make it

(Last working with rotating code)

local Primary 
for i,v in pairs(game.Selection:Get()) do
	if i == 1 then
		Primary = v
	end
	if v ~= Primary then
		local Weld = Instance.new("Motor6D",Primary)
		Weld.Name = v.Name
		Weld.C1 = v.CFrame.Rotation*CFrame.new(Primary.Position-v.Position)
		Weld.Part0 = Primary
		Weld.Part1 = v
	end 
end

nvm i found the normal code ye

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