How do I assign these sounds into an array?
script.parent.Touched:Connect(function()
local sound = {workspace.Ambient.Sound1, workspace.Ambient.Sound2}
sound.Volume = 0
end)
How do I assign these sounds into an array?
script.parent.Touched:Connect(function()
local sound = {workspace.Ambient.Sound1, workspace.Ambient.Sound2}
sound.Volume = 0
end)
They already are in an array. If you want to play them all at once, use a for loop.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Can you expand on that?
Here's a video from AlvinBlox about tables: https://www.youtube.com/watch?v=4it-gbXldn8