You can write your topic however you want, but you need to answer these questions:
Hi,
for some reason in my output it says Infinite yield possible on ‘Players.EzraPalo.PlayerGui.InventoryGui.InventoryFrame.ItemsFrame:WaitForChild(“Komodo Dragon”)’ - Studio
I check in the explorer, and it is there, so im not sure whats the problem.
Ive looked at other posts, but none of them seem to solve my problem.
Heres my code:
local prompt = script.Parent.ProximityPrompt
prompt.Triggered:Connect(function(player)
for i, v in player.Inventory:GetChildren() do
if v.Name == "Net" then continue end
local name = v.Name
local itemButton = player.PlayerGui.InventoryGui.InventoryFrame.ItemsFrame:WaitForChild(name)
itemButton:Destroy()
print("destroyed")
end
end)
Thanks in advance!