yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 06 Jun 2014 08:51 PM |
18:53:18.253 - math is not a valid member of ImageButton
local AssetBase = "http://www.roblox.com/asset?id="
open = false script.Parent.MouseButton1Click:connect(function() if open == false then open = true
script.math.random:Play(1-100) script.Parent.Image = AssetBase.."160258660"
elseif open == true then open = false
script.Parent.Sound:Pause() script.Parent.Image = AssetBase.."160258645"
end end) |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
|
| 06 Jun 2014 09:05 PM |
| What are you trying to do with the script? im trying to help ;.; |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 06 Jun 2014 09:06 PM |
The script is in a ImageButton.
The ImageButton has 6 sounds in it.
I want it to play a new sound after you turn it back on.
18:53:18.253 - math is not a valid member of ImageButton |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2014 09:07 PM |
| It thinks math.random is an item |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2014 09:08 PM |
Try this:
local AssetBase = "http://www.roblox.com/asset?id="
open = false script.Parent.MouseButton1Click:connect(function() if open == false then open = true
script.math.random(1,100) script.Parent.Image = AssetBase.."160258660"
elseif open == true then open = false
script.Parent.Sound:Pause() script.Parent.Image = AssetBase.."160258645"
end end)
|
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|