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: My script doesn't work.

Previous Thread :: Next Thread 
Sam27 is not online. Sam27
Joined: 31 May 2008
Total Posts: 6
18 Feb 2012 02:59 PM
I would like to know what's wrong with this script:

function clickit()
if (script.Parent.Parent.Shutdown.Value == 0) then
script.Parent.Parent.ShieldGeneratorPart0.Reflectance = 0
script.Parent.Parent.ShieldGeneratorPart0.GeneratorScript.Disabled == true
script.Parent.Parent.Shutdown.Value = 1
script.Parent.BrickColor = BrickColor.new("Bright green")
else
script.Parent.Parent.ShieldGeneratorPart0.GeneratorScript.Disabled = false
script.Parent.BrickColor = BrickColor.new("Bright red")
script.Parent.Parent.Shutdown.Value = 0
end

script.Parent.ClickDetector.MouseClick:connect(clickit)
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
18 Feb 2012 03:01 PM
Add another end.
Report Abuse
Sam27 is not online. Sam27
Joined: 31 May 2008
Total Posts: 6
18 Feb 2012 03:01 PM
Sorry, this isn't exactly the script I put. I put:

function clickit()
if (script.Parent.Parent.Shutdown.Value == 0) then
script.Parent.Parent.ShieldGeneratorPart0.Reflectance = 0
script.Parent.Parent.ShieldGeneratorPart0.GeneratorScript.Disabled = true
script.Parent.Parent.Shutdown.Value = 1
script.Parent.BrickColor = BrickColor.new("Bright green")
else
script.Parent.Parent.ShieldGeneratorPart0.GeneratorScript.Disabled = false
script.Parent.BrickColor = BrickColor.new("Bright red")
script.Parent.Parent.Shutdown.Value = 0
end

script.Parent.ClickDetector.MouseClick:connect(clickit)
Report Abuse
Sam27 is not online. Sam27
Joined: 31 May 2008
Total Posts: 6
18 Feb 2012 03:02 PM
Thanks for the quick answer!
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
18 Feb 2012 03:06 PM
Np.
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