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
 

Simple script fix

Previous Thread :: Next Thread 
Zythyx is not online. Zythyx
Joined: 18 May 2011
Total Posts: 6503
07 Aug 2011 10:13 PM
OKay
Green button:
function onClicked()
script.Parent.Parent.Gate.Transparency = 0
script.Parent.Parent.Gate.CanCollide = false
wait(.001)
end

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

Red button
function onClicked()
script.Parent.Parent.Gate.Transparency = 1
script.Parent.Parent.Gate.CanCollide = true
wait(0.001)
end

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

I want green to open and red to close
Currently:
Green closes
Red opens
Report Abuse
nPwn is not online. nPwn
Joined: 17 Sep 2010
Total Posts: 3197
07 Aug 2011 10:28 PM
works fine just have it all in a model
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
08 Aug 2011 12:22 AM
THis is what I would do

Ungroup and

GREEN
function onClicked()
Game.Workspace.Part.Transparency = 1--Change the part to the name
Game.Workspace.Part.CanCollide = false--change
wait(.1)
end
script.Parent.ClickDetector.MouseClick:connect(onTouch)

and do the same thing with red exept transparency = 0 and CanCollide = true
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
08 Aug 2011 12:22 AM
Sorry Transparency for green is 0 not 1(from what your saying)
Report Abuse
nPwn is not online. nPwn
Joined: 17 Sep 2010
Total Posts: 3197
08 Aug 2011 01:09 AM
You're a little late lol
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