I want to learn how to change my script to not have repetitive lines and print the name of the button I press
local frame = script.Parent
for i, v in frame:GetChildren() do
if v:IsA("GuiButton") then
v.Activated:Connect(function()
print(v.Name)
end)
end
end
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.