I made a script where different music will play according to what is going on with the game. It's a LocalScriptin the StarterPlayerScripts, and the music folder is in ReplicatedStorage. However, the music doesn't play and there is no output error. Here's the code:
RoundRunning = game.ServerStorage.IsRoundRunning.Value
Inter = game.ServerStorage.Intermission.Value
--[[Song Variables]]--
local songs = game.ReplicatedStorage["Action Game Playlist"]
local battlefield = songs.SSBBBattlefield
local gourmet = songs.SSBBGourmetRace
local dedede = songs.SSBBKingDedede
local storm = songs.SSBBSongOfStorms
local tabuu = songs.SSBBVsTabuu
local tf2 = songs.TF2IntruderAlert
local patch = songs.MrPatch
local billy = songs.ChillyBilly
local temple = songs.Temple
local playlist = {battlefield, gourmet, dedede, storm, tabuu, tf2, patch, billy, temple}
--[[Functions]]--
function playSong()
print("playing")
local i = math.random(1, #playlist)
local currentSong = playlist[i]
currentSong:Play''
currentSong.Looped = true
end
function stopSong()
print("stopped")
battlefield:Stop''
gourmet:Stop''
dedede:Stop''
storm:Stop''
tabuu:Stop''
tf2:Stop''
patch:Stop''
billy:Stop''
temple:Stop''
end
--[[Call the functions]]--
game.ServerStorage.Intermission.Changed:connect(function()
if Inter == true then
print("intermission is running")
stopSong()
end
end)
game.ServerStorage.IsRoundRunning.Changed:connect(function()
if RoundRunning == true then
print("round true")
playSong()
end
end)

2 comments
ServerStorage can only be accessed by server scripts. Use ReplicatedStorage for local scripts to be able to access it.
I changed all the game.ServerStorage to game.ReplicatedStorage, however it still doesn't work.