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: Triggering a GUI Sound

Previous Thread :: Next Thread 
MasterDaniel is not online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
08 Jan 2012 02:22 PM
This script is meant to trigger when the image in a GUI is the one specified.


if script.Parent.imll.Image == "http://www.roblox.com/asset/?id=69662003"
then script.Parent.button:Play()
wait(0.3)
script.Parent.button:Play()
else
end

But, it doesn't work.

(Oh and its meant to play a "beep" twice.)

Can anyone help? And also, one question of general intrest - if this fired, would everyone hear the sound?
Report Abuse
CrazyBananaMonkey is not online. CrazyBananaMonkey
Joined: 10 Nov 2009
Total Posts: 1599
08 Jan 2012 02:32 PM
Use a .Changed function connector to detect when the image is changed, then play the sound. You can search it on the wiki for more info. And, I'm not sure, as I don't use sounds much.
Report Abuse
MasterDaniel is not online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
09 Jan 2012 11:53 AM
Okay, thanks
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
09 Jan 2012 12:24 PM
[ Content Deleted ]
Report Abuse
MasterDaniel is not online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
09 Jan 2012 02:47 PM
Tried that, doesn't work. Ill run an output.
There isn't one :o

Ill start looking at the wiki now
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
09 Jan 2012 03:09 PM
if script.Parent.imll.Image == "http://www.roblox.com/asset/?id=69662003"
then script.Parent.button:Play()
wait(0.3)
script.Parent.button:Play()
else--Wth is this?????
end

fixed

script.Parent.Changed:connect(function()
if script.Parent.imll.Image == "http://www.roblox.com/asset/?id=69662003"
then script.Parent.button:Play()
wait(0.3)
script.Parent.button:Play()
end)

You do know this is a guess.
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
09 Jan 2012 03:10 PM
script.Parent.Changed:connect(function()
if script.Parent.imll.Image == "http://www.roblox.com/asset/?id=69662003"
then
script.Parent.button:Play()--?
end)

try this.
Report Abuse
MasterDaniel is not online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
10 Jan 2012 12:22 PM
still not working. Wouldn't you need a connection line at the bottom?
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
10 Jan 2012 02:51 PM
No because I did this:

script.Parent.Changed:connect(function()
end)

You need connection line when you do this:

function FUNCTIONNAME()
-stuff
end
script.Parent.Changed:connect(FUNCTIONNAME)
Report Abuse
MasterDaniel is not online. MasterDaniel
Joined: 28 Nov 2008
Total Posts: 2866
10 Jan 2012 03:23 PM
Ahh, alright
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