I have created a Welding script which welds an armor in Server storage(cloned) to my upper torso. Now the armor has many parts and a middle upper torso. After setting the upper torso, when I go for other parts to be welded they are not perfectly oriented. So can anyone tell me what is that I am doing wrong? Note : Middle is the real Upper Torso part that needs to be welded and Union1 is an extra detail that I created.
local tool = script.Parent
local player = game.Players.LocalPlayer
local char = player.Character
local debounce = false
tool.Equipped:Connect(function(mouse)
mouse.KeyDown:Connect(function(key)
if key == "h" then
if not debounce then
debounce = true
char.UpperTorso.Transparency = 1
--Upper Torso
--Middle
local uppertorsoweld = Instance.new("Weld")
local uppertorso = game.ServerStorage.IronManSuit.UpperTorso2.Middle:Clone()
uppertorso.CFrame = char.UpperTorso.CFrame
uppertorso.Parent = script.Parent
uppertorsoweld.Part0 = char.UpperTorso
uppertorsoweld.C0 = char.UpperTorso.CFrame:Inverse()
uppertorsoweld.Part1 = uppertorso
uppertorsoweld.C1 = uppertorso.CFrame:Inverse()
uppertorsoweld.Parent = script.Parent
-- Union 1
local uppertorso1weld = Instance.new("Weld")
local uppertorso1 = game.ServerStorage.IronManSuit.UpperTorso2.Union1:Clone()
uppertorso1.CFrame = uppertorso.CFrame*CFrame.new(0,0.27,-0.06)
uppertorso1.Parent = script.Parent
uppertorso1weld.Part0 = uppertorso
uppertorso1weld.C0 = uppertorso.CFrame:Inverse()
uppertorso1weld.Part1 = uppertorso1
uppertorso1weld.C1 = uppertorso1.CFrame:Inverse()
uppertorso1weld.Parent = script.Parent
wait(5)
debounce = false
end
end
end)
end)

7 comments
Ok thx.
So like 3.14 radians is 180 Degrees right?
It moves the part instead of orienting it.
hmm, should not be doing that. try it w/o inverse
also try each axis to see if they also moves
ok
Nope. This time w/o inverse the weld is not created at all