|
| 24 Apr 2014 04:45 PM |
| I am working on a game and it has slide doors that are opened with a button. How do I make a slide door with buttons? |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 04:45 PM |
first thing's first
learn RBX.Lua
wiki.roblox.com |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 04:47 PM |
| I am learning Lua but I need to make the slide door now... |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
| |
|
|
| 24 Apr 2014 04:48 PM |
| if player clicks then if door not open then vector3.new (probably a loop would be best) |
|
|
| Report Abuse |
|
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
|
| 24 Apr 2014 04:49 PM |
--You may have to edit this slightly
but=Instance.new('ClickDetector',yourpart) but.MaxActivationDistance=6 leftdoor=yourleftdoor rightdoor=yourrightdoor
but.MouseButton1Down:connect(function() for i=0,100,5 do wait() leftdoor.CanCollide=false rightdoor.CanCollide=false leftdoor.CFrame=leftdoor.CFrame*CFrame.new(-0.3,0,0) rightdoor.CFrame=rightdoor.CFrame*CFrame.new(0.3,0,0) wait(4) leftdoor.CFrame=leftdoor.CFrame*CFrame.new(0.3,0,0) rightdoor.CFrame=rightdoor.CFrame*CFrame.new(-0.3,0,0) end end)
|
|
|
| Report Abuse |
|
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
|
| 24 Apr 2014 04:51 PM |
| Sorry, add just before the second to last 'end' leftdoor.CanCollide=true rightdoor.CanCollide=true |
|
|
| Report Abuse |
|
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 24 Apr 2014 04:51 PM |
tell me how big the doors are I crush ^ and ^^ |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 04:52 PM |
| The doors are about as big as a normal door. It is the slide door from SCP containment breach. |
|
|
| Report Abuse |
|
|
12packkid
|
  |
| Joined: 24 Jun 2011 |
| Total Posts: 1418 |
|
|
| 24 Apr 2014 04:59 PM |
Sorry, but what he means by size is, if you open up explorer (located in the view tab of ROBLOX Studio) and also open up properties (found in the same tab) you will find that the parts true size is in the 'Size' property.
e.g 2, 4, 1.2
He wants you to paste that. |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 05:07 PM |
| I'll PM when I can check it out. Can't right now because of the internet. |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 05:17 PM |
b = Instance.new("ClickDetector", script.Parent) db = false
function open() for i = 1,script.Parent.Size.Z*10 do script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,0,.1) end end function close() for i = 1,script.Parent.Size.Z*10 do script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,0,-.1) end end
b.MouseClick:connect(function() if db == false then db = true open() elseif db == true then db = false close() end end)
Just put this inside the door. |
|
|
| Report Abuse |
|
|
|
| 24 Apr 2014 06:17 PM |
| Am I suppost to put this as a child of workspace or the button's child? |
|
|
| Report Abuse |
|
|
2unknown2
|
  |
| Joined: 30 Oct 2011 |
| Total Posts: 9351 |
|
|
| 24 Apr 2014 06:18 PM |
Put this in the doors it loops them
while true do end repeat until false |
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
| |
|