|
| 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 |
|
|
|
| 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 |
|
|
| |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 10 Jan 2012 12:22 PM |
| still not working. Wouldn't you need a connection line at the bottom? |
|
|
| Report Abuse |
|
|
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 |
|
|
| |
|