Tool not being shown in roblox inventory

I dont know why, but the Item does not show up in roblox’s inventory bar, but it does show up in the sstarterPack folder. The whole inventory system works on Object values which control what to clone.

Ive tried manually placing a tool in the starter pack just to see if it would work, and it works

here is a video:

here is the coode:

UI_Interface.MouseButton1Click:Connect(function()
				wait(0.1)
					
				local itemPreview = objValue.Value:Clone()
				itemPreview.Parent = script.Parent.PreviewFrame
				
				itemPreview.Drop.MouseButton1Click:Connect(function()
					itemPreview:Destroy()
					UI_Interface:Destroy()
					UI_Interface_RoundEdger:Destroy()
					
				end)
				
				itemPreview.Equip.MouseButton1Click:Connect(function()
					local instanceItem = itemPreview.Equip.Value.Value:Clone()
					instanceItem.Parent = game.StarterPack
					
					itemPreview:Destroy()
					UI_Interface:Destroy()
					
				end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

dont parent tools to starterpack
you need to parent the tool to Player.Backpack

3 Likes

Dumbness overpowered me once again, thank you.

1 Like

As the above post suggests, you need to clone the tools to the player’s backpack not their starterpack, which means you’ll need to reference the player in the script, if the script is a local script, this will work:

local player = game.Players.LocalPlayer

UI_Interface.MouseButton1Click:Connect(function()
	local itemPreview = objValue.Value:Clone()
	itemPreview.Parent = script.Parent.PreviewFrame
	itemPreview.Drop.MouseButton1Click:Connect(function()
		itemPreview:Destroy()
		UI_Interface:Destroy()
		UI_Interface_RoundEdger:Destroy()
	end)
	
	itemPreview.Equip.MouseButton1Click:Connect(function()
		local instanceItem = itemPreview.Equip.Value.Value:Clone()
		instanceItem.Parent = player.Backpack
		itemPreview:Destroy()
		UI_Interface:Destroy()
	end)
end)

I also noticed that you were missing a 3rd “end” statement, since you started 3 lambda (anonymous) functions but only 2 of them had corresponding end statements to complete them.