This is more of a theory question, but is what said in the title bad practice?
I know the title is a bit confusing, so here’s an example; say you want to perform a certain tween for a GUI object when it is hovered over. The most self-explanatory solution is to loop through all the objects using this:
for i, v in ipairs(GUIObject:GetChildren()) do
v.MouseHoverEnter:Connect(function()
-- Blah Blah Blah
end)
end
Is this bad practice? Is there a better option? I have considered trying OOP for the first time, but it seems not great since I have a lot of different GUI objects that have different needs, and making a ton of classes seems kind of tedious. I have heard about subclasses, but I have no idea how to implement this. Thanks!