Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Music won't play when player's stage value changes?

This is in a localscript in StarterCharacterScripts and has a numbervalue child

--script for playing music locally depending on player's stage value

if script.Stage.Value == 2 then
	game.Workspace.Music.Stage1:Stop()
	wait(0.2)
	game.Workspace.Music.Stage2:Play()
end

3 comments

0

try an integer value

0

Please post the entire script.

0

This is the entire script

1 answer

You need an Checker that checks all time not just one time so you can use:

local stage = script.Stage

while wait() do
if stage.Value == 2 then
workspace.Music.Stage1:Stop
wait(0.1)
workspace.Music.Stage2:Play()
end
end

This discussion is preserved as it was. New answers, comments, and votes are closed.