PlayOnRemove (Property): Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Hihi
No edit summary
>Flurite
No edit summary
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== PlayonRemove ==
{{CatUp|Properties}}
*'''Author''' hihi


It is very simple to stop music you get from playing!
{{Property|
name                = PlayOnRemove
|property            = [[Bool]] ''PlayOnRemove''
|description          = When true, the sound will play when removed.
|object              = Sound
|}}


#Click tools
[[Category:Properties]]
#click the "+" next to workspace
#scroll down
#Select the music or sound
#look at the properties
#fill in the check next to "Play on remove"
 
'''If you dont have workspace or properties'''
 
#Click tools
#Click the view button ontop
#look for properties and workspace
#Click them.
 
'''The script'''
 
<pre>
local s = Instance.new("Sound")
 
s.Name = "Sound"
s.SoundId = "e51fef40bfd5bb1327e46dc65715aa6e"
s.Volume = 1
s.Looped = true --See where it says looped? change true to false
s.archivable = false
 
s.Parent = game.Workspace
 
wait(0)
 
s:play()
 
</pre>
 
'''Changing the script'''
It says true after the "=" next to looped, change the word "true" to "false"
for it to remove so it only plays once. and this is all (hihi).

Latest revision as of 16:34, 30 December 2011

PlayOnRemove
Property Bool PlayOnRemove
Description When true, the sound will play when removed.
Member of Sound