Hello, I want to modify this code
-- You can add up to 3 sounds for this. Add or delete resource.addfile as you need resource.AddFile("sound/startandendmusic/startmusic/start_music_1.mp3") resource.AddFile("sound/startandendmusic/startmusic/start_music_2.mp3") -- Remember to change the name of the sounds to the sound you want from above local function PlayMusic(wintype) if wintype == WIN_INNOCENT then BroadcastLua('surface.PlaySound("music/start/start_music_1.mp3")') elseif wintype == WIN_TRAITOR then BroadcastLua('surface.PlaySound("music/start/start_music_2.mp3")') end end hook.Add("TTTBeginRound", "MyMusic", PlayMusic)
But instead of round end I want it to randomize one of these files and play it at the beginning.
THanks in advanced.