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
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: I need to make a pressure plate to activate sound.

Previous Thread :: Next Thread 
Lanturn845 is not online. Lanturn845
Joined: 02 Feb 2013
Total Posts: 303
03 Jun 2014 10:35 AM
I don't know what to do because I made an invisible block that is supposed to make sound. Here's the script

function onTouched(hit)
script.Parent.Screech:Play()
end
script.Parent.Touched:connect(onTouched)

Does this script make it so I have to click it to make the sound? x3
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
03 Jun 2014 10:36 AM
no, you step on it, and itll play the sound
Report Abuse
Lanturn845 is not online. Lanturn845
Joined: 02 Feb 2013
Total Posts: 303
03 Jun 2014 10:39 AM
It's on a local script and yeah. The pressure plate is in workspace, the script to activate the pressure plate is in the pressure plate. The sound is also in workspace is that correct?
Report Abuse
GeneralUserInterface is not online. GeneralUserInterface
Joined: 25 May 2011
Total Posts: 26
03 Jun 2014 10:42 AM
If you want to play it only one time, then I recommend you to add a debounce here, since you have 5 body parts that may simultaneously touch it and may trigger the function 5 times.

http://wiki.roblox.com/index.php?title=Debounce
Report Abuse
islandmaker2012 is not online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
03 Jun 2014 10:44 AM
not a localscript, regular
put the sound into the part
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