I have a mechanic where tools in the hotbar visually show on the player, it uses a weld on the torso (in this case). I have it so when the tool is unequipped it destroys the clone of the item on the back of the player.
For some reason, when I equip the tool. There’s a very small amount of the time when the arm appears in the air because of the weld, even though the weld is on a clone of the tool and not the actual tool instance that’s being equipped. Here is the script that is responsible and here’s a video of what I mean
local PlayerService = game:GetService("Players")
local Character = script.Parent
local LocalPlayer = PlayerService:GetPlayerFromCharacter(Character)
LocalPlayer.Backpack.ChildAdded:Connect(function(child: Instance)
if not child:IsA("Tool") then
return
end
local Tool = child
local Model = child:FindFirstChild(child.Name):Clone()
Model.Parent = Character
local Motor = Instance.new("Motor6D", Model)
Motor.Part0 = Character:FindFirstChild("Torso")
Motor.Part1 = Model
Motor.C0 = child:FindFirstChild("Handle").AttachPosition.Value
-- Destroy the model immediately upon equipping the tool
Tool.Equipped:Connect(function()
if Model and Model.Parent then
Model:Destroy()
end
end)
-- Also destroy the model if the tool is removed from the backpack
Tool.AncestryChanged:Connect(function(_, parent)
if not parent then -- Tool was removed
if Model and Model.Parent then
Model:Destroy()
end
end
end)
end)