Custom tools - Some show and some don't?

Hello, I have a script where it is supposed to “equip” a custom tool through this function:

local serverStorage = game:GetService("ServerStorage")

local actions = {}

function actions.EquipItem(player, itemName)
	local char = player.Character

	if serverStorage.Items[itemName] and player.Inventory.Items[itemName] then
		if char:FindFirstChild("Item") then 
			char:FindFirstChild("Item"):Destroy()
		end

		local itemClone = serverStorage.Items[itemName]:Clone()
		itemClone.Name = "Item"
		itemClone.Parent = char
		itemClone:SetPrimaryPartCFrame(char.RightHand.CFrame)

		local weld = Instance.new("WeldConstraint", itemClone.Handle)
		weld.Part0 = itemClone.Handle
		weld.Part1 = char.RightHand
	end
end

return actions

It’s using welds to weld a handle onto the characters right hand, and then I weld the other parts of the tool to the handle. For some models it works perfectly, but others it doesn’t work. For the ones that don’t work it shows the Item model and handle, but it appears as if the other parts have been deleted or parented elsewhere?

Here are the models I’m trying, the paper doesn’t work and the pillow does.
Screen Shot 2023-07-05 at 8.54.12 PM

Do you have any ideas on what is going wrong? I can give more information if need. Thanks in advance!

1 Like

When you said:

Do you mean that the model contains other parts than the Handle and the MeshPart? and in the picture you sent, it doesn’t seems that the MeshPart welded to anything I dont see a weld inside of it so if you clone the tool to the character the MeshPart will fall and if it’s not collidable it will fall into the void and destroyed.

1 Like

Oh, this is my bad I should’ve posted something. However when I started studio the next day everything ran perfectly and was fixed. I have no idea why, but I won’t complain :sweat_smile:! Either way I appreciate your reply though.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.