script.Parent.Touched:Connect(function(hit)
local humanoid = hit.Parent:FindFirstChild("Humanoid")
local plr = game.Players.LocalPlayer
if (humanoid ~= nil) then
for _,tools in pairs(plr.Backpack:GetChildren()) do
if tools:IsA("Tool") then
local i = Instance.new("TextLabel",plr.PlayerGui.pack.Frame)
i.Text = tools.Name
print(tools.Name)
end
end
end
end)
COMMUNITY QUESTION
when i do in pairs it dose it more than once how do i stop that?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
The point of a loop is that it does something multiple times. You are not very clear with your question. Could you explain your problem in more depth?
The parent argument of Instance.new is deprecated. Also, I'm unsure exactly what you're trying to do. Either you don't know how loops work or you need to add a debounce.
"Break"
This is in much need of articulation, can you do that? It would help a lot. One more thing: what is the script supposed to actually do?