Basically I have a game that I want to use a sound in
I want it to start playing whenever the user joins the game but want to end it when they click "Start" in a welcome Gui.
I want it to loop until the user clicks "Start", too, and am currently using this simple code to play it and loop it:
while true do script.Parent:Play() wait(98) end
How would I go about the modifications that I desire, as seen above?
script.Parent.Looped = true script.Parent:Play() Button.MouseButton1Click:connect(function() script.Parent:Remove() end)
local ButtonClicked = false Button.MouseButton1Click:connect(function() ButtonClicked = true end) repeat script.Parent:Play() until ButtonClicked == true