I have like 22 Parts and each one has 1 ScreenGui that has Two ImageLabels on it. **I am planning to change all the ImageLabel Images with a single button at once. **
Is there a possible way to make the script simple and short?
Try grouping the buttons as many as possible in a Frame in order for this to work:
for i,v in pairs(Frame:GetChildren()) do if v IsA('TextButton') then v.MouseButton1Click:connect(function() --Do your stuff end) end end
I hope.