at line 48
if v.order.Value == nextnumber-1 then
-- this make the only latest tool will be cloned into the player's inventory.
and insert function that destroy previous tool (at line 55)
for i,v in pairs(plr.Backpack:GetChildren()) do -- line 55
if v:FindFirstChild("order") and v.order.Value < nextnumber-1 then
v:Destroy()
-- it will destroy only tool that have "order" value, like a previous tool
-- if player have other tool like boombox, it will not being destroy
end
end
game.ReplicatedStorage.Remotes.BUYTOOL:FireClient(plr , item) -- this line not changed
So basically lets say i have 99b currency, the tool costs 100b currency. It buys the tool and it breaks my text update text and there is no errors in output