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 » Building Helpers
Home Search
 

Re: Help making a button door.

Previous Thread :: Next Thread 
Nlanphere7 is not online. Nlanphere7
Joined: 16 Oct 2009
Total Posts: 469
29 Aug 2011 11:14 AM
I want to make a button activated door for my HQ but I don't know how. Please help. Thanks :D
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 11:20 AM
You want it to open and close or apart
Report Abuse
31drake is not online. 31drake
Joined: 10 Dec 2010
Total Posts: 341
29 Aug 2011 11:30 AM
Ok, heres what you do:
Get a brick, name it door,
Get two smaller bricks, make one open, and once close (green and red)
Insert this script into open:
function onClicked()
script.Parent.Parent.Door.Transparency=0.5
script.Parent.Parent.Door.CanCollide=false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

and put a click detector into open.

Then do the same with close, but put this script in:
function onClicked()
script.Parent.Parent.Door.Transparency=0
script.Parent.Parent.Door.CanCollide=true
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

Then group the open and close switches and the door togther.
Report Abuse
RadioactiveWafflez is not online. RadioactiveWafflez
Joined: 25 Jun 2010
Total Posts: 3453
29 Aug 2011 11:37 AM
Or you can use my 402 line door in my models, It's really smooth.
Report Abuse
31drake is not online. 31drake
Joined: 10 Dec 2010
Total Posts: 341
29 Aug 2011 11:38 AM
Thats free models...
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 11:39 AM
Hmmm... too complicated(2 Buttons with a different effect :O)

Use this script too open and close with one script(Use only one button)


debonce = true
B = script.Parent
D = script.Parent.Parent.Door

function OpenDoor()
if debounce then

D.Transparency = 0.5
D.CanCollide = false
B.BrickColor = BrickColor.new("Bright red")
debounce = false

else

D.Transparency = 0
D.CanCollide = true
B.BrickColor = BrickColor.new("Bright green")
debounce = true
end
end
B.ClickDetector.MouseClick:connect(OpenDoor)

this way...


Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 11:39 AM
woops sorry firs line debounce = true
Report Abuse
31drake is not online. 31drake
Joined: 10 Dec 2010
Total Posts: 341
29 Aug 2011 11:40 AM
Its not a button door if you dont use a button to clos it. lol
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 11:44 AM
You do u use the same button to open and close
Report Abuse
31drake is not online. 31drake
Joined: 10 Dec 2010
Total Posts: 341
29 Aug 2011 11:50 AM
Hmm, button doors that close after a time would be cooler, like in EW bases,

EG:

function onClicked()
script.Parent.Parent.Door.Transparency=0
script.Parent.Parent.Door.CanCollide=true
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)

wait: (3)
script.Parent.Parent.Door.Transparency=1
script.Parent.Parent.Door.CanCollidefalse
end
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 11:51 AM
shouldn't that be like this (idk if yours works i never do it that way)

function onClicked()
script.Parent.Parent.Door.Transparency=0
script.Parent.Parent.Door.CanCollide=true
wait(3)
script.Parent.Parent.Door.Transparency=1
script.Parent.Parent.Door.CanCollide = false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
31drake is not online. 31drake
Joined: 10 Dec 2010
Total Posts: 341
29 Aug 2011 11:55 AM
I didnt try, I just made it up, but your one would probaly work
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 12:16 PM
Should he be even looking to the scripts we gave?
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 12:21 PM
Oh yeah wait if you use my button twice there should be a few changes
call 1 button Button1
and the other Button2


Button1 beneath the script

local function Fix()
if script.Parent.Parent.Button2.BrickColor = BrickColor.new("Bright green") then
debounce = false
script.Parent.BrickColor = BrickColor.new("Bright red")
elseif script.Parent.Parent.Button2.BrickColor = BrickColor.new("Bright red") then
debounce = true
script.Parent.BrickColor = BrickColor.new("Bright green")
end
end
script.Parent.ClickDetector.MouseClick:connect(Fix)

In button2

local function Fix()
if script.Parent.Parent.Button1.BrickColor = BrickColor.new("Bright green") then
debounce = false
script.Parent.BrickColor = BrickColor.new("Bright red")
elseif script.Parent.Parent.Button1.BrickColor = BrickColor.new("Bright red") then
debounce = true
script.Parent.BrickColor = BrickColor.new("Bright green")
end
end
script.Parent.ClickDetector.MouseClick:connect(Fix)


That should do

Report Abuse
31drake is not online. 31drake
Joined: 10 Dec 2010
Total Posts: 341
29 Aug 2011 12:35 PM
There are going to be alot of noobs stealing that script.....
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 12:37 PM
Well yeah, then they do so, maybe i typed something wrong making or well the script does nothing, or well making an action not happening

Maybe i don't know i made it once but i just typed this one here so
Report Abuse
31drake is not online. 31drake
Joined: 10 Dec 2010
Total Posts: 341
29 Aug 2011 12:46 PM
I just learned scripting, but I learnt by looking in the scripts of free models. lol.
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
29 Aug 2011 12:52 PM
Yeah that's a good way to learn.
In the past wiki was too but it changed a lot...
Report Abuse
Nlanphere7 is not online. Nlanphere7
Joined: 16 Oct 2009
Total Posts: 469
29 Aug 2011 02:23 PM
Thanks guys xD
Report Abuse
BlizzardWizzard101 is not online. BlizzardWizzard101
Joined: 26 Oct 2010
Total Posts: 5146
29 Aug 2011 02:25 PM
Take one in my models
Report Abuse
31drake is not online. 31drake
Joined: 10 Dec 2010
Total Posts: 341
29 Aug 2011 02:25 PM
NP, gets my posts up... jk, I like helping :)
Report Abuse
shawny3051 is not online. shawny3051
Joined: 21 May 2010
Total Posts: 3017
23 Nov 2011 03:24 PM
......
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Building 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