generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help with script

Previous Thread :: Next Thread 
nepenthesrajah is not online. nepenthesrajah
Joined: 25 Jun 2013
Total Posts: 390
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 is not online. 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 is not online. 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
nepenthesrajah is not online. nepenthesrajah
Joined: 25 Jun 2013
Total Posts: 390
12 Aug 2013 09:10 AM
Thankyou
Report Abuse
nepenthesrajah is not online. nepenthesrajah
Joined: 25 Jun 2013
Total Posts: 390
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image