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
 

Clicking and Touching and...

Previous Thread :: Next Thread 
acercraver is not online. acercraver
Joined: 26 Mar 2013
Total Posts: 69
21 Apr 2013 02:25 AM
How to script a door again.
The one with the clickable buttons.
Report Abuse
yomamadude6 is not online. yomamadude6
Joined: 21 Nov 2009
Total Posts: 2151
21 Apr 2013 02:48 AM
http://wiki.roblox.com/index.php/Clickdetector

Use the .MouseClick event
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
21 Apr 2013 06:45 AM
door = {locate the part} --LOCATE IT
me = script.Parent

function smiley()
door.CanCollide = false
door.Transparency = .7
me.BrickColor = BrickColor.new("Really red")
end

function lol()
door.CanCollide = true
door.Transparency = 0
me.BrickColor = BrickColor.new("Lime green")
end

function oc()
if door.CanCollide == true then
smiley() else
lol()
end
end

script.Parent.Mousebutton1down:connect(oc)

Put the above into a script, into a part. Then locate the door. If you want to have a separate button and door, then don't put door = script.Parent
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
21 Apr 2013 06:47 AM
The script I just wrote is for a separate button and door, by the way.
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