you’re changing the sound id 2 times in a row making it play ONLY the last song
I’m not changing the sound id, it creates 2 instances playing 1 sound , so you can put as much music as you want
Why are you starting a argument? that really wasn’t needed.
Dont take it personally, basically everyone agrees that you don’t need a module for this anyway, were saying what is the point of this.
And as he said, reducing the lines of code by 1 isn’t really a big deal.
yeah playing which sound exactly? yeah both
Any sound, even 2 same sounds or both different.
you’re playing both sounds at the exact same time, that’s not how this module works, again if you thing this module is useless then go ahead flag it
Then just
local sound1 = playaudio("soundid")
sound1:Play()
sound1.Ended:Wait()
local sound2 = playaudio("soundid")
sound2:Play()
k now loop the whole process for me.
sure.
function playaudio(soundid:string) : Instance
local sound = Instance.new('Sound')
sound.Parent = workspace
sound.SoundId = soundid
return sound
end
while true do
local sound1 = playaudio("soundid")
sound1:Play()
sound1.Ended:Wait()
local sound2 = playaudio("soundid")
sound2:Play()
sound2.Ended:Wait()
end
See? It’s still short, even if this module just does it in 4 lines.
Also just to increase efficiency.
function playaudio(soundid:string) : Instance
local sound = Instance.new('Sound')
sound.Parent = workspace
sound.SoundId = soundid
return sound
end
local sound1 = playaudio("SoundId")
local sound2 = playaudio("Soundid2")
while true do
sound1:Play()
sound1.Ended:Wait()
sound2:Play()
sound2.Ended:Wait()
end
I recommend you just flag the post, as its getting offtopic now, their also no point in arguing.
Also just to increase efficiency.
function playaudio(soundid:string) : Instance
local sound = Instance.new('Sound')
sound.Parent = workspace
sound.SoundId = soundid
return sound
end
local sound1 = playaudio("SoundId")
local sound2 = playaudio("Soundid2")
while true do
sound1:Play()
sound1.Ended:Wait()
sound2:Play()
sound2.Ended:Wait()
end
h
took you forever to get it right, but still the module does it better.
How? What does it do to make it better?
exactly what i said, agreed if he doesn’t think it’s useful then just flag it
you can add as much songs as you want, with the script you wrote say you add 10 songs, ur gonna have to make the same loop 10 times
The same loop 10 times? Do you mean 10 while true do loops? Also what’s the problem with just looping through a table and music play and ending them?
No, what I mean is you’re gonna have to copy it and paste it multiple times just to make a playlist of 10 songs.
Then just make a table and make a for i,v in pair loop. End of discussion. No need for module
k told you from the beginning if you don’t think it’s useful then flag it