Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help with audio playing in-game?

Asked by 10 years ago
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.

0
Try it in a Regular script because local scripts do not run server-side. Find a new way to find player. EzraNehemiah_TF2 3552 — 10y
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 NinjoOnline 1146 — 10y

Answer this question