local player = game.Players.LocalPlayer

while wait() do
	if player.leaderstats.Level.Value == 1 then
		game.Workspace.CalmMusic:Play()
	elseif player.leaderstats.Level.Value == 2 then
		game.Workspace.AdventureMusic:Play()
	end
end

Inside a LocalScript. I have the audio set, but it dosent play the sound, I want it to be a different audio every level, so it suits the theme of the level.

2 comments

0

Try it in a Regular script because local scripts do not run server-side. Find a new way to find player.

0
  1. You can ONLY use LocalScripts for the sound to play to a certain player and 2. Everything in here works if I change lines 5,7 to print("Work"), so its something with ROBLOXS audio