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

Play button stops the current sound but doesn't play another as intended. What should I do?

Asked by 2 years ago

I am trying to make it so when a Play button is pressed, it stops the current sound and plays another sound. With this script it stops the current sound but it doesn't play the other sound. What's wrong with it?

FULL SCRIPT:

wait (0)
script.Sound:Play()

local PlayButton = script.Parent.PLAY

repeat wait()
    Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = workspace.CameraPart.CFrame

PlayButton.MouseButton1Click:Connect(function()
    Camera.CameraType = Enum.CameraType.Custom
    PlayButton:Destroy()

wait (0)
    script.Sound:Stop()

wait (0)
    script.Sound2:Play()

end)
0
provide the soundID ChicaLower 25 — 2y

Answer this question