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

Anyone know how to make a sound when you leave the game?

In get a snack at 4am if you leave the game it plays some ufo sound and I really thought that was cool so anyone got the script for it?

1 answer


game.Close:Connect(function()
-- enter play sound function and sound ID
end)

That might do the trick.

2 comments

0

In theory, this would work, but ROBLOX closes before a sound is played, at least in my testing.

0

What about parenting it to the player removed function?

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