|
| 12 Aug 2013 09:04 AM |
Hi i really dont know how to make a script like this... Player clicks green button Sound plays Player clicks red button Sound Stops Any ideas?
|
|
|
| Report Abuse |
|
|
robber4
|
  |
| Joined: 20 Jun 2008 |
| Total Posts: 203 |
|
|
| 12 Aug 2013 09:05 AM |
use an onClicked function that will :Play() the sound and copy that brick, making the other one :Stop() the sound.
http://wiki.roblox.com/index.php/Making_an_onClicked_script |
|
|
| Report Abuse |
|
|
Infocus
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 8022 |
|
|
| 12 Aug 2013 09:08 AM |
Put sound in workspace. Put this in a brick
sound = workspace["SOUNDNAME"]
db = false
lal = Instance.new("Part", workspace) lal.Anchored = true lal.BrickColor = BrickColor.new("Bright green")
a = Instance.new("ClickDetector" lal)
a.MouseClick:connect(function() if not db then db = true lal.BrickColor = BrickColor.new("Really red") sound:Play() elseif db == true then lal.BrickColor = BrickColor.new("Bright green") sound:Stop() -- Idk if this is it db = false end end)
|
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Aug 2013 09:19 AM |
| Im a little confused ive bought green button and red button inserted the script and sound name beep.pfd but nothing happens when i click them |
|
|
| Report Abuse |
|
|