Hello Im Making a Gui that when the player clicks the button it plays a sound it plays the sound but when the player dies it plays the song again and loops over it This script below is a Local Script Inside the GUI
Player = game.Players.LocalPlayer
s1 = script.Parent.Sound1
s2 = script.Parent.Sound2
play = script.Parent.Frame.Play
mousepressedPlay = false
box = script.Parent.Frame
function MouseEnterPlayButton()
play.FontSize = "Size48"
s1:play()
box:remove()
end
function MouseLeftPlayButton()
play.FontSize = "Size24"
s1:play()
if then
end
end
function PlayGame()
if mousepressedPlay == false then
s2:Play()
wait(3)
s2:remove()
end
end
play.MouseEnter:connect(MouseEnterPlayButton)
play.MouseEnter:connect(MouseLeftPlayButton)
play.MouseButton1Down:connect(PlayGame)
