Is there any way to put a .Touched event on all childrens of a folder?

Hey!
I am making a game where i have a bunch of eggs and when a player touches them a GUI pops up telling them what egg they found. I want to tween the GUI but for every egg. My eggs are currently in a folder called “Eggs”. How can i put a .Touched event on a folder?
Thanks!

Yes! I could give a small snippet of how I do it:


local folder = --path

for _, Object in pairs(folder:GetChildren()) do
       Object.Touched:Connect(function(obj)
              -- code here
       end)
end

1 Like

I see u were faster at typing than me.