I’ve been trying to make a script that puts the tool model in your hip / back but I’m having issues using tools with multiple parts.
This is my current script
while wait() do
if script.Parent.Parent.Name == "Backpack" then
local Chararacter = script.Parent.Parent.Parent.Character
if Chararacter then
local Torso = Chararacter:FindFirstChild("Torso")
local Weapon = Chararacter:FindFirstChild(script.Parent.Name)
if Torso and not Weapon then
local WeaponOnLeg = Instance.new("Model")
WeaponOnLeg.Name = script.Parent.Name
WeaponOnLeg.Parent = Chararacter
Handle = script.Parent:GetChildren()
for i, child in pairs(Handle) do
if child:IsA("Part") then child:Clone()
child.Parent = WeaponOnLeg
local LegWeld = Instance.new("Weld")
LegWeld.Name = "WeldOnLeg"
LegWeld.Part0 = Torso
LegWeld.Part1 = child
LegWeld.C0 = CFrame.new(0,0,0)
LegWeld.C0 = LegWeld.C0 * CFrame.fromEulerAnglesXYZ(math.rad(0),math.rad(0),math.rad(0))
LegWeld.Parent = Handle
end
end
else
if Handle.Parent then
Handle.Parent:Destroy()
end
end
end
end
end
error is
invalid argument #3 (Instance expected, got table)