Someone in my project has made a model to replace with a basic AI. I've easily welded all the parts to a "torso" in the model, a centre part. However, whenever I attempt to weld this torso part to anything such as the HumanoidRootPart the AI will get very buggy. Glitching, teleporting, ect.
Details - All the parts inside the model have CanCollide set to false and none are anchored.
Here's the welding script..
torso = script.Parent:WaitForChild("Torso")
torso = script.Parent:WaitForChild("Torso")
for _,v in ipairs(script.Parent:GetDescendants()) do
if v:IsA("Part") or v:IsA("UnionOperation") or v:IsA("WedgePart") then
if v.Name ~= "Torso" then
local weld = Instance.new("Weld")
weld.Parent = v
weld.Part0 = torso
weld.Part1 = v
weld.C0 = torso.CFrame:inverse()
weld.C1 = v.CFrame:inverse()
v.CanCollide = false
wait()
v.Anchored = false
elseif v.Name == "Torso" then
local weld = Instance.new("Weld")
weld.Parent = v
weld.Part0 = script.Parent.Parent.RightHand
weld.Part1 = v
weld.C0 = torso.CFrame:inverse()
weld.C1 = v.CFrame:inverse()
end
end
end
Would appreciate any feedback possible :D

4 comments
you use r15?
what do u think it has torso not uppertorso
No, it's R15. The 'Torso' is the name of the centre part of the model.
r15 dosnt have a torso insted it has a upper and lower torso