How do i make a function happen if you touch parts in a specific folder?

im working on a gun system and i really need help with this.

for i,v in pairs(folder:GetChildren()) do
	v.Touched:connect(function(hit)
		-->> Code goes here
	end)
end
1 Like