from what I understand, while loops can be very demanding to a player's gameplay, slowing the game down. So while I was making this I could find no other way of doing this without a while loop. Is there a better way to check if a part in a table has been touched?
My attempt:
local model = game:GetService("Workspace").Model
local table = {}
for i,v in pairs (model:GetChildren()) do -- This part is different, It's for the sake of the site
table.insert(table,#table+1,v)
end
for i,v in pairs(table) do
v.Touched:Connect(function()
print("Touched")
end)
end

10 comments
No
No... U
No me
Yes no u
Actually, no u
no no me, no u
No me, no u
Try using recursion?
Whats recursion..?
calling a function inside itself. its usually completely unnecessary but hey http://wiki-origin.roblox.com/index.php?title=Recursion