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
 

I need gui help!

Previous Thread :: Next Thread 
DragonFox11 is not online. DragonFox11
Joined: 15 Nov 2013
Total Posts: 284
01 Apr 2014 06:38 PM
i have a sound but all it does is play how could i fix this and make it pause?


script.Parent.MouseButton1Down:connect(function()
script.Sound:Play()
script.Sound:Pause()
end)
Report Abuse
DragonFox11 is not online. DragonFox11
Joined: 15 Nov 2013
Total Posts: 284
01 Apr 2014 06:38 PM
or maybe i could click a separate button?
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
01 Apr 2014 06:44 PM
Don't double post and it's not pausing because the play method is beforehand.. if you want to have a play/pause/resume button then make one button the play button with this script;

script.Parent.MouseButton1Down:connect(function()--First time clicking plays initially
Sound:Play()
script.Parent.MouseButton1Down:connect(function()--If it's clicked again it pauses
Sound:Pause()
script.Parent.MouseButton1Down:connect(function()--If clicked while paused,keeps playing
Sound:Play()
end)end)end)
Report Abuse
DragonFox11 is not online. DragonFox11
Joined: 15 Nov 2013
Total Posts: 284
01 Apr 2014 06:50 PM
thanks and yea it double posted so i worried i would get a spam warning
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