How can I get the tool in the first slot

image
No matter what tool it is, how can i get the tool thats in the first slot #1

Probably Instance | Roblox Creator Documentation could work:

local first = game.Players.LocalPlayer.Backpack:FindFirstChildWhichIsA("Tool")

wont work because if its equipped it wont be inside the backpack

Do it at the start of the game or do it on StarterBackpack, then.

Otherwise I’m not sure there’s a solution.

Why do you want to do this in the first place?

It is impossible to know what tool is first unless you make a custom toolbar by using

game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)

Try making an ObjectValue that stores the tool as its value, then it will still point to that tool when it is equipped and out of the backpack