How to swap tool you want with one you have equipped?

  1. What do you want to achieve? Custom hot-bar system that allows you to swap the tool you have equipped with the one you want to pick up.

  2. What is the issue? Well, in what I have working right now when you try to pick up an item when your hot-bar is full it just deletes it from existence. Trying to drop an item with backspace also deletes it.

  3. What solutions have you tried so far? I’ve looked at a few YouTube tutorials but they don’t meet the specifications. I know I’ll have to get the handle’s position but I could just use some extra help fixing it and understanding

Here’s the bit that I’m assuming is where the fix will be needed,

local function updateHotbar()


	for i, child in pairs(hotbar:GetChildren()) do

		if child.Name == "Slot" then child:Destroy() end
	end


	for i, tool in pairs(tools) do


		if i > slotMax then return end

Replying so this pops up on recent, I still need help with it :slight_smile: