The information on this page may no longer be accurate. To see the latest, go to our new and improved documentation. You can also learn more about the future of documentation.
Collapse Sidebar




When true, the Sound will play when it is removed from the game.

Note the sound will play when the Instance/Parent property of the Sound or one of its ancestors is set to nil. This means all of the following will cause the sound to play when PlayOnRemove is true. Note, this includes Instance/Destroy as the destroy function sets the parent to nil.

sound.Parent = nil
sound.Parent.Parent = nil

Code Samples

Sound PlayOnRemove

In this sample a sound is created in the workspace, PlayOnRemove is set to true and the sound is then destroyed.

As Sound.PlayOnRemove is true, the sound will play when it is removed.