I have this in a local script, inside a textbutton, to equip a tool, the tool is in replicated storage, plsfix
local player = game.Players.LocalPlayer
local pickaxe = player.Backpack:FindFirstChild("Pickaxe")
script.Parent.MouseButton1Click:connect(function(player)
local pickaxe = player.Backpack:findFirstChild("Pickaxe")
if script.Parent.Text == "Unequip" then
pickaxe.Parent = game.ServerStorage
script.Parent.Text = "Equip"
else
pickaxe:Clone().Parent = player.Backpack
script.Parent.Text = "Unequip"
end
end)

1 comment
Kenny, I read your code until line 2...local pickaxe = player.Backpack:FindFirstChild("Pickaxe")...well, when you equip your pickaxe its no longer in your backpack, it's in your player. so that might be one issue