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: How to....

Previous Thread :: Next Thread 
ramboyelectrix is not online. ramboyelectrix
Joined: 31 Mar 2013
Total Posts: 1289
29 Mar 2014 05:02 AM
How do I make it so that if presses left click while holding a tool, an audio plays
Report Abuse
compy111 is not online. compy111
Joined: 02 Apr 2009
Total Posts: 583
29 Mar 2014 06:07 AM
tool = script.Parent

tool.Activated:connect(function()
Sound:Play()
end)
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
29 Mar 2014 06:29 AM
@Compy


"clicks"(WHILE HOLDING)
Report Abuse
compy111 is not online. compy111
Joined: 02 Apr 2009
Total Posts: 583
29 Mar 2014 06:58 AM
tool.Activated won't connect if you don't have the tool equipped as long as I remember.
Tool activated

Description of Activated():
Fired when the player clicks while a tool is equipped.
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
29 Mar 2014 07:04 AM
@Compy

he means left click the mouse while he already is equipped with the tool .-.

xd
Report Abuse
compy111 is not online. compy111
Joined: 02 Apr 2009
Total Posts: 583
30 Mar 2014 03:27 AM
that's exactly the same?
Report Abuse
Spongocardo is not online. Spongocardo
Joined: 06 Sep 2008
Total Posts: 2843
30 Mar 2014 05:34 AM
@baheeg compy's script is right.
@compy What if he clicked again? You'd need to stop the audio before it plays again so that the audio isn't spammed.

When life gives you lemons... BURN HIS HOUSE DOWN! >:D
Report Abuse
compy111 is not online. compy111
Joined: 02 Apr 2009
Total Posts: 583
30 Mar 2014 06:28 AM
He asked to play it, not to stop ;-)

But when you add a sound there is a property called: 'Looped'.
If you uncheck that it will stop after playing once.
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