Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Making A Weld Script; Character Upside Down?

So my NPC's right arm wont animate with the tool equipped. I've narrow the issue down to it being that the weld script I had been using was requiring the tool to be anchored; SO I went about making one for myself instead

local parts = {} 
local handle = script.Parent.Handle
local children = script.Parent:GetChildren()
for idx,child in ipairs(children) do
	if(child.ClassName == "Part")then
		table.insert(parts,idx,child)
	end
end
if parts ~= nil then
	for key,value in pairs(parts) do
		if(tostring(value) ~= "Handle") then
			key = Instance.new("ManualWeld",handle)
			key.Part0 = handle
			key.Part1 = value
		end
	end
--[[else 
	print("failure")]]
end

This Takes each of the parts in my Tool and welds them to the handle; And it works; but When I go to equip the tool on an npc or myself; the tool remains stationary and flips my character upside down?

1 answer

✓ Accepted answer

After you're done welding, you must have a loop set Anchored to false for each part of the tool.

1 comment

0

Thank you!

This discussion is preserved as it was. New answers, comments, and votes are closed.