Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Cloning all parts in a tool and welding to right arm puts them all in 1 spot?

Asked by 6 years ago

I'm having trouble animating the right arm while holding a tool, so I unchecked RequiresHandle and simply welded all the parts inside the tool to the right arm, but they're all placed in the center, I tried messing around with C0 and C1 to try to move them in the right spot, no such luck.

Here's what I have so far:


--CONFIG-- --Offset to the tool Offset = Vector3.new(0,1,0) --CONFIG-- Tool.Equipped:connect(function(moose) print("Staff Equipped") local Real = Tool:WaitForChild("Real",1) local Main = Real:WaitForChild("Main",1) for i=1, #Real:GetChildren() do local fake = Real:GetChildren()[i] local weld = Instance.new("Weld", fake) weld.Part0 = weld.Parent weld.Part1 = char["Right Arm"] local pos = (Real:GetChildren()[i].Position - Main.Position)*2 weld.C0 = CFrame.new(pos) + Offset end end)

Answer this question