I’m making this game where there are different GUIs for different sections. For example: level, shop, premium, etc. I have several buttons and I want them to make a click sound at the same time.
Here are the GUIs. (I know, it’s a lot of buttons in there):
You can’t exactly get them to play at the same time but you can get close. Though not sure why you would want to play all the sounds at the same time.
-- When button is pressed
-- Loop through the buttons
task.spawn(function()
-- Play Sound
end)
-- or
-- When button is pressed
-- Loop through the buttons
coroutine.wrap(function()
-- Play Sound
end)
You could do this script, parent it under startergui and should be localscript
local sound = -- put sound here
for _,gui in pairs(script.Parent:GetDescendants())
if gui:IsA("TextButton") or gui:IsA("ImageButton") then
sound:Play()
end
end