Talk:Sounds: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker
testing
>Mindraker
mNo edit summary
Line 23: Line 23:


script.Parent.Touched:connect(onTouched)
script.Parent.Touched:connect(onTouched)
</pre>
</pre> {{User:Mindraker/sig}} 19:12, 19 August 2008 (CDT)
 
and
 
 
{{User:Mindraker/sig}} 19:12, 19 August 2008 (CDT)

Revision as of 00:23, 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)

MINDRAKER 19:12, 19 August 2008 (CDT)