Talk:Sounds: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker
Tested
>Mindraker
testing
Line 1: Line 1:
== Testing ==
== Testing ==


OK, this has been tested because this is the code I just worked with on the [[Music|music]] page.  {{User:Mindraker/sig}} 19:12, 19 August 2008 (CDT)
OK, this has been tested because this is pretty much the code I just worked with on the [[Music|music]] page.   
<pre>
debounce = false
function onTouched(hit)
if debounce == false then
debounce = true
local s = Instance.new("Sound")
s.Name = "Sound"
s.SoundId = "yourSoundIdGoesHere" -- SoundId! Type here yours.
s.Volume = 1
s.Looped = false
s.archivable = false
 
s.Parent = game.Workspace
 
wait(0)
 
s:play()
end
end
 
script.Parent.Touched:connect(onTouched)
</pre>
 
and
 
 
{{User:Mindraker/sig}} 19:12, 19 August 2008 (CDT)

Revision as of 00:22, 20 August 2008

Testing

OK, this has been tested because this is pretty much the code I just worked with on the music page.

debounce = false
function onTouched(hit)
if debounce == false then
debounce = true
local s = Instance.new("Sound")
s.Name = "Sound"
s.SoundId = "yourSoundIdGoesHere" -- SoundId! Type here yours.
s.Volume = 1 
s.Looped = false 
s.archivable = false 

s.Parent = game.Workspace

wait(0)

s:play() 
end
end

script.Parent.Touched:connect(onTouched)

and


MINDRAKER 19:12, 19 August 2008 (CDT)