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'm going to go insane too!

Previous Thread :: Next Thread 
TheShoeBox is not online. TheShoeBox
Joined: 20 Aug 2010
Total Posts: 5022
23 Feb 2012 04:10 PM
This won't work. I've tried EVERYTHING. Basicly, it changes a bricks color when its parent is clicked. I added something so if the generator is orange and is clicked, it also works. But it broke it. Any help?

x = script.Parent.Parent.GenColor
function onClicked()
if x.BrickColor == BrickColor.new("Lime green") then
x.BrickColor = BrickColor.new("Really red")
elseif x.BrickColor == BrickColor.new("Really red") then
x.BrickColor = BrickColor.new("Lime green")
elseif x.BrickColor == BrickColor.new("Deep orange") then
x.BrickColor = BrickColor.new("Lime green")
end
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

Report Abuse
TheShoeBox is not online. TheShoeBox
Joined: 20 Aug 2010
Total Posts: 5022
23 Feb 2012 04:18 PM
Bump
Report Abuse
ap1ratesl1fe is not online. ap1ratesl1fe
Joined: 17 Nov 2008
Total Posts: 368
23 Feb 2012 04:34 PM
x = script.Parent.Parent.GenColor
function onClicked()
if x.BrickColor == BrickColor.new("Lime green") then
x.BrickColor = BrickColor.new("Really red")
elseif x.BrickColor == BrickColor.new("Really red") then
x.BrickColor = BrickColor.new("Deep orange") -- changed this. Derp.(no herp)
elseif x.BrickColor == BrickColor.new("Deep orange") then
x.BrickColor = BrickColor.new("Lime green")
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

Report Abuse
TheShoeBox is not online. TheShoeBox
Joined: 20 Aug 2010
Total Posts: 5022
23 Feb 2012 04:36 PM
I wasn't wanting that. The brick starts orange for certain purposes.
Report Abuse
ap1ratesl1fe is not online. ap1ratesl1fe
Joined: 17 Nov 2008
Total Posts: 368
23 Feb 2012 04:38 PM
Then it should work, I've tested.
Report Abuse
TheShoeBox is not online. TheShoeBox
Joined: 20 Aug 2010
Total Posts: 5022
23 Feb 2012 04:42 PM
Then what's wrong with mine? Everythihng should work, but it doesn't.
Report Abuse
ap1ratesl1fe is not online. ap1ratesl1fe
Joined: 17 Nov 2008
Total Posts: 368
23 Feb 2012 04:44 PM
maybe you connected it wrong? maybe the last line should be
x.ClickDetector.MouseClick:connect(onClicked)
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