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: Instructions On How To Make A Door That Opens When Clicked?

Previous Thread :: Next Thread 
Emeritous is not online. Emeritous
Joined: 11 Nov 2013
Total Posts: 24
30 Dec 2013 01:40 AM
The title says it all.
Report Abuse
Odro is not online. Odro
Joined: 27 Dec 2013
Total Posts: 45
30 Dec 2013 02:09 AM
Ask scripting helpers.
Report Abuse
Zeriten is not online. Zeriten
Joined: 05 Nov 2012
Total Posts: 19839
30 Dec 2013 02:20 AM
free models \m/

the inner machinations of my mind are an enigma
Report Abuse
legobotron is not online. legobotron
Joined: 17 Mar 2011
Total Posts: 2668
30 Dec 2013 10:15 AM
Use click detectors. Put one in the button (the part you want clicked). Insert another part. Then, go ask Scripting Helpers.
Report Abuse
DominusPrimus is not online. DominusPrimus
Joined: 24 Oct 2013
Total Posts: 878
30 Dec 2013 11:33 AM
Put in a click detector, then put

OnClicked()
Game.Workspace.(DOORNAMEHERE).CanCollide = False

then

OnClicked()
Game.Workspace.(DOORNAMEHERE).CanCollide = True.

If you want to make it slightly transparent

OnClicked()
Game.Workspace.(DOORNAMEHERE).CanCollide = False
Game.Workspace.(DOORNAMEHERE).Transparency = 0.5

then

OnClicked()
Game.Workspace.(DOORNAMEHERE).CanCollide = True
Game.Workspace.(DOORNAMEHERE).Transparency = 0

Go to scripting helpers though...
Report Abuse
legobotron is not online. legobotron
Joined: 17 Mar 2011
Total Posts: 2668
30 Dec 2013 02:08 PM
Dominus, that's not going to work efficiently. In fact, it's not going to work at all. It IS on the right track, though.
Report Abuse
YumERAGON is not online. YumERAGON
Joined: 18 Apr 2012
Total Posts: 3893
30 Dec 2013 03:18 PM
He wants it to swing not to turn off the cancollide when you click it.
Report Abuse
legobotron is not online. legobotron
Joined: 17 Mar 2011
Total Posts: 2668
30 Dec 2013 05:50 PM
He wants it to swing?

MY hammer.
Report Abuse
ZeroHour66 is not online. ZeroHour66
Joined: 14 Sep 2013
Total Posts: 1511
30 Dec 2013 07:45 PM
OnClicked()
Game.Workspace.(Door).CanCollide = False

then

OnClicked()
Game.Workspace.(Door).CanCollide = True.

--This is only if you want it transparent

OnClicked()
Game.Workspace.(Door).CanCollide = True
Game.Workspace.(Door).Transparency = 0.5

OnClicked()
Game.Workspace.(Door).CanCollide = False
Game.Workspace.(Door).Transparency = 0
Report Abuse
legobotron is not online. legobotron
Joined: 17 Mar 2011
Total Posts: 2668
30 Dec 2013 07:57 PM
Zero, that's almost exactly what Dominus posted. I'll just make one:

script.Parent.MouseClick:connect(function()
door = script.Parent.Parent
if door.Transparency == 0 then
door.Transparency = 1
door.CanCollide = false
elseif door.Transparency == 1 then
door.Transparency = 0
door.CanCollide = true
end
end)

This is what explorer should look like:

>Door (Part)
>ClickDetector (ClickDetector)
>Script (Script)

This script will make the door, when clicked, open if it is closed or close if it is opened.

MY hammer.

Report Abuse
legobotron is not online. legobotron
Joined: 17 Mar 2011
Total Posts: 2668
30 Dec 2013 07:59 PM
I forgot to add instructions:
1. Insert a "Part".
2. Insert a "ClickDetector" into that Part.
3. Insert a "Script" into that ClickDetector.
4. Use the script I posted above, pasting it into the Script instance.

MY hammer.
Report Abuse
Blockerjr800th is not online. Blockerjr800th
Joined: 24 May 2010
Total Posts: 3175
30 Dec 2013 08:01 PM
Put a Clickdetector, script into the part you want to click. You will have to use both CFrame.new and CFrame.Angles.

script.Parent.CFrame = Script.Parent.CFrame * CFrame.new(0,0,0) * CFrame.Angles(0,0,0)
Report Abuse
legobotron is not online. legobotron
Joined: 17 Mar 2011
Total Posts: 2668
30 Dec 2013 09:13 PM
Is Emeritous asking for a door that swings open or goes transparent and CanCollide false?
Report Abuse
alphaboy299 is not online. alphaboy299
Joined: 15 Jun 2013
Total Posts: 1496
30 Dec 2013 09:35 PM
ask him
Report Abuse
legobotron is not online. legobotron
Joined: 17 Mar 2011
Total Posts: 2668
31 Dec 2013 06:37 AM
Um, ok. Emeritous, are you asking for a door that swings open or a door that goes transparent and able to be walked through?

MY hammer.
Report Abuse
Emeritous is not online. Emeritous
Joined: 11 Nov 2013
Total Posts: 24
31 Dec 2013 02:02 PM
Im asking for one the swings when clicked, thank you.
Report Abuse
cainsuper3 is not online. cainsuper3
Joined: 14 Jul 2009
Total Posts: 2107
31 Dec 2013 02:57 PM
Make sure the button has a click detector in

Function onClicked()
script.Parent.Transparency=0.5
script.Parent.CanCollide=false
wait(5)
script.Parent.Transparency=0.5
script.Parent.CanCollide=false
end
Report Abuse
legobotron is not online. legobotron
Joined: 17 Mar 2011
Total Posts: 2668
31 Dec 2013 02:58 PM
Oh, whups.

MY hammer.
Report Abuse
Kingmouli is not online. Kingmouli
Joined: 28 Sep 2012
Total Posts: 1292
31 Dec 2013 03:48 PM
Lol most of the scripts here don't work at all. Most of you don't even put the connection line >:I

~Kingmouli, King of the Mouli~
Report Abuse
scacman1967 is not online. scacman1967
Joined: 06 Aug 2011
Total Posts: 9288
31 Dec 2013 03:56 PM
http://www.roblox.com/Shuttered-window-item?id=118605218

These don't swing but they look like it. Click on the door it goes to open, click the door again it goes to closed. Thanks EgoMoose(tummey2) and Screwdeath for the scripts.
Report Abuse
ultralaser360 is not online. ultralaser360
Joined: 02 Oct 2011
Total Posts: 784
31 Dec 2013 06:07 PM
Personally i do not like swinging doors but here:
Put in a click detector
then a value named V and a another one named value
Then put a script in and paste this in
function onClicked()
if script.Parent.Value.Value == true then
script.Parent.Value.Value = false
if script.Parent.V.Value == true then
script.Parent.V.Value = false
wait(0)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.35) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0)
wait(0.01)

elseif script.Parent.V.Value == false then
script.Parent.V.Value = true

script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0.05, 0, -0.36) * CFrame.fromEulerAnglesXYZ(0, -0.1, 0)
wait(0.01)
script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.285) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
wait(0.01)

end

script.Parent.Value.Value = true
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
ultralaser360 is not online. ultralaser360
Joined: 02 Oct 2011
Total Posts: 784
31 Dec 2013 06:08 PM
Should work fine but once again it never opens up the way you want it to
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