Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it normal to use i,v loops for an event?

So Im an really efficient guy I do code really efficient like hella efficient

i use an i,v loop for an event

lets say there are imagebutton in a folder

I do this

for i,v in pairs(Options:GetChildren()) do
	v.MouseButton1Up:Connect(function()


	end)
end

i was wondering if there is anything wrong with this

1 answer

✓ Accepted answer

Uh the question is why would you ask this? everyone codes in a different way, different format, different mehotds, i can keep going on, There's nothing wrong with that code, it's actually pretty nice which i think alot of us use in example of not wanting to make each buttons function takes up spaces , and so on. and one more thing while i answer this we or as in I, I use this very often in my GUI's when there's an non-existing button getting created later on, or removed.

The point of my answer is it's very much normal and that chunk of code it should be done that way in my point of view.

This discussion is preserved as it was. New answers, comments, and votes are closed.