local Sound = script.Sound
local ContendProvider = game:GetService("ContentProvider")
local MaxSound = 2
local CurrSound = 0
local Music = {
551334045,
1524396093,
627848963,
}
while true do
if CurrSound <= MaxSound then
Sound.SoundId = "rbxassetid://"..Music[CurrSound]
CurrSound = CurrSound + 1
Sound:Play()
Sound.Ended:Wait()
else
CurrSound = 0
end
end
i tried making this music script and im new to tables can someone explain to me what i did wrong
Output error / Players.ExternalSight.PlayerGui.MusicScript:20: attempt to concatenate string with nil

1 comment
Ah my bad i tought tables started at 0 instead of 1