For loops with getpropertychangedsignal

So let’s say you have a folder and there’s a bunch of values, how could you use a for loop save yourself time so you don’t use Getpropertychangedsignal for each one, a leading to the same outcome?
I thought of:

for _, values in pairs(folder:GetChildren()) do
values:GetPropertyChangedSignal("Value"):Connect(whatevercuntion)
end)
end

But i can’t test it. Can anyone tell me?

for _, value in pairs(folder:GetChildren()) do
	value:GetPropertyChangedSignal("Value"):Connect(function()
		-- function goes here
	end)
end
1 Like

Yes, besides the typo on GetChildren that would work perfectly.

1 Like

Mobile keyboard moment ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.