Music Playlist Script Roblox Studio
Music Playlist Script Roblox Studio
steps:
Insert a script into ServerScriptService (Not a local script!!!)
Change the script into our script
Add audio into your script
Name the audios like this: sound1, sound2, sound3 etc. So you know what volgorde het heeft
Try it out!!!
Script:
local sound1 = script.Sound1
local sound2 = script.Sound2
local sound3 = script.Sound3
while true do
for i = 1, 3 do
local currentSound = script["Sound" .. i] --CB
currentSound:Play()
currentSound.Ended:Wait() --CB
end
end
-- Script made by Content Bakeryπ§
π‘ Notes:
This playlist supports up to 3 songs.
Want more? Just add them like this:
local sound4 = script.Sound4Β
And make sure Sound4 is a child of the script.
βIf the script isnβt working, check if script.Sound{number} actually exists as a child under the script.β
Easier (Chooses random sounds and you don't need to change the names):
do the same steps but change the script to this script.
script:
local sounds = script:GetChildren()
while true do
for _, sound in ipairs(sounds) do
if sound:IsA("Sound") then
sound:Play()
sound.Ended:Wait()
end
end
end