lV0rd
(Tin)
August 16, 2022, 8:47am
#1
Sup yall
So I’m trying to make a playlist but the code isn’t working proprely.
local m = game.SoundService.Sound
while true do
m:Play()
print("okay")
m.Ended:Wait()
m.SoundId = "rbxassetid://1837879082"
wait(2)
print(1)
m:Play()
print("okay")
m.Ended:Wait()
m.SoundId = "rbxassetid://5409360995"
wait(2)
print(2)
m:Play()
print("okay")
m.Ended:Wait()
m.SoundId = "rbxassetid://9048375035"
wait(2)
print(3)
m:Play()
print("okay")
m.Ended:Wait()
m.SoundId = "rbxassetid://9044565954"
wait(2)
print(4)
m:Play()
print("okay")
m.Ended:Wait()
m.SoundId = "rbxassetid://1842559618"
wait(2)
print(5)
m:Play()
print("okay")
m.Ended:Wait()
m.SoundId = "rbxassetid://9047050075"
wait(2)
print(6)
m:Play()
print("okay")
m.Ended:Wait()
m.SoundId = "rbxassetid://9046862941"
wait(2)
print(7)
m:Play()
print("okay")
m.Ended:Wait()
m.SoundId = "rbxassetid://7029099738"
wait(2)
print(8)
end
It prints the “okay” and “1” but doesn’t play the next song and nothing on the output. Any support is appreciated.
(this script is in serverscriptservice)
Does it play the first song. If not, you might have to set it as ‘Playing’, in the sound properties.
lV0rd
(Tin)
August 16, 2022, 8:58am
#3
yes it does also enabling playing wont do a thing either.
Try getting rid of the print()
statments and see if it plays maybe.
lV0rd
(Tin)
August 16, 2022, 9:09am
#5
still doesn’t play (eeee)aaaaoo
What is the volume of the sound? If it is too quiet you won’t be able to hear it.
lV0rd
(Tin)
August 16, 2022, 9:11am
#7
.5 why ? (character cap is bad)
When the script tries to play the next sound, does the SoundID
change in the sound object?
lV0rd
(Tin)
August 16, 2022, 9:15am
#9
yes it does change char cap is bad
lV0rd
(Tin)
August 16, 2022, 9:24am
#11
yes it does (char cap is bad and stupid)
lV0rd
(Tin)
August 16, 2022, 9:27am
#12
it started playing the first one, but it doesnt play when the soundid is changed, i tried to fix it on my own but i failed. thats why im here rn.
1 Like
Pegagittt
(Pegagit)
August 16, 2022, 9:28am
#13
I tested it and i dont know why but when u add wait(1) there the Sound will not play.
It will not play if u do this:
m.SoundId = "rbxassetid://1837879082"
wait(2)
m:Play()
But if will play if u do this:
m.SoundId = "rbxassetid://1837879082"
m:Play()
I dont know why this is happening
1 Like
lV0rd
(Tin)
August 16, 2022, 9:31am
#14
nope, that just made it worse , now it doesn’t even play the first one.
Pegagittt
(Pegagit)
August 16, 2022, 9:32am
#15
Is this a Localscript or a ServerScript?
lV0rd
(Tin)
August 16, 2022, 9:32am
#16
server script why would i make it local if it is in serverscriptservice?
Pegagittt
(Pegagit)
August 16, 2022, 9:33am
#17
I dont saw the serverscript text wait i will check it again
Pegagittt
(Pegagit)
August 16, 2022, 9:48am
#18
I dont know why but the Sound dont Plays when u add wait()
inside SoundID
and Play
. So i added Wait after Ended. And insert the Sound to Workspace because i think it will not work in SoundService because its Local. Try it and tell me if it worked
local m = game.Workspace.Sound
while task.wait() do
m:Play()
m.Ended:Wait()
task.wait(2)
m.SoundId = "rbxassetid://1837879082"
m:Play()
m.Ended:Wait()
task.wait(2)
m.SoundId = "rbxassetid://5409360995"
m:Play()
m.Ended:Wait()
task.wait(2)
m.SoundId = "rbxassetid://9048375035"
m:Play()
m.Ended:Wait()
task.wait(2)
m.SoundId = "rbxassetid://9044565954"
m:Play()
m.Ended:Wait()
task.wait(2)
m.SoundId = "rbxassetid://1842559618"
m:Play()
m.Ended:Wait()
task.wait(2)
m.SoundId = "rbxassetid://9047050075"
m:Play()
m.Ended:Wait()
task.wait(2)
m.SoundId = "rbxassetid://9046862941"
m:Play()
m.Ended:Wait()
task.wait(2)
m.SoundId = "rbxassetid://7029099738"
end
3 Likes
Avanthyst
(Avanthyst)
August 16, 2022, 9:48am
#19
Why don’t you make a function in which when you change the ID, you clone the sound object and parent it then remove the old one and :Play() the new one?