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
 

Help!

Previous Thread :: Next Thread 
yankeejr is not online. 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 is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
06 Jun 2014 08:52 PM
bump!
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
06 Jun 2014 08:54 PM
another
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
06 Jun 2014 08:57 PM
again
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
06 Jun 2014 09:02 PM
again [2]
Report Abuse
jeremy2003ko is not online. jeremy2003ko
Joined: 11 Feb 2010
Total Posts: 583
06 Jun 2014 09:03 PM
what are you doing here?
Report Abuse
yankeejr is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
06 Jun 2014 09:04 PM
again [3]
Report Abuse
jeremy2003ko is not online. jeremy2003ko
Joined: 11 Feb 2010
Total Posts: 583
06 Jun 2014 09:05 PM
What are you trying to do with the script? im trying to help ;.;
Report Abuse
yankeejr is not online. 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
jeremy2003ko is not online. jeremy2003ko
Joined: 11 Feb 2010
Total Posts: 583
06 Jun 2014 09:07 PM
It thinks math.random is an item
Report Abuse
jeremy2003ko is not online. jeremy2003ko
Joined: 11 Feb 2010
Total Posts: 583
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 is not online. yankeejr
Joined: 04 Jul 2012
Total Posts: 4906
06 Jun 2014 09:18 PM
bump!
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