|
| 25 Oct 2015 12:00 PM |
| with scripting... so it opens. |
|
|
| Report Abuse |
|
|
Cytheur
|
  |
| Joined: 12 Aug 2014 |
| Total Posts: 7328 |
|
|
| 25 Oct 2015 12:17 PM |
Just free model 'opening door'.
>Look in script. >Disect >Recreate
- Codsterr |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2015 02:37 PM |
OK: I found this in a free model: local cf = script.Parent.CFrame
function onClicked() if script.IsOpened.Value == false and script.IsOpening.Value == false then script.IsOpening.Value = true for i = 1,16 do script.Parent.CFrame = script.Parent.CFrame * CFrame.new(0, 0, 0.18) * CFrame.fromEulerAnglesXYZ(0, 0.1, 0) wait(0.01) end script.IsOpening.Value = false script.IsOpened.Value = true elseif script.IsOpened.Value == true and script.IsOpening.Value == false then script.IsOpening.Value = true for i = 1,16 do script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, -0.1, 0) * CFrame.new(0, 0, -0.18) wait(0.01) end script.IsOpening.Value = false script.IsOpened.Value = false script.Parent.CFrame = cf script.CloseSound:Play() end end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
This is the layout of my door: >Door >>Model
>>>Union
>>>Part
>>>Part
>>Model
>>>Union
>>>Part
>>>Part
>>>Wedge
>>Part |
|
|
| Report Abuse |
|
|
|
| 25 Oct 2015 02:44 PM |
I'm going to use :SetPrimaryPartCFrame() to do this. I have a brick on the edge that is the primary part. I must somehow set the primarypartcframe to rotate the entire door 90 degrees and then back. I am not sure how I will do this. I just know that I must do it.
:) |
|
|
| Report Abuse |
|
|
| |
|