Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 4 years ago

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

Log in to vote
1
Answered by
VitroxVox 884 Moderation Voter
4 years ago
Edited 4 years ago

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.

Ad

Answer this question