noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 22 Oct 2014 03:26 AM |
| How would I open a door normally via script? I think it has something to do with CFrame.Angles |
|
|
| Report Abuse |
|
|
ohno1112
|
  |
| Joined: 23 Mar 2013 |
| Total Posts: 833 |
|
|
| 22 Oct 2014 07:38 AM |
No, Nope, and No.
make a small part, wich will rotate the door around itself,
then, make a motor, join part and Door (with part as Part0)
use desiredangle on motor in order to rotate the door. |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2014 07:46 AM |
You can do this easy with simple CFrame math. A "swinging" motion instead of rotation from the center:
local increment = .05 -- best to keep it to a 5-base of 1(0)-base increment
function RunAnimation(p) local p = p or script.Parent local rightframe = p.CFrame + p.CFrame:vectorToWorldSpace( Vector3.new(1,0,0) * p.Size.X/2 ) for i = 0, math.pi/2, .05 do wait() local newframe = rightframe * (CFrame.Angles(0, -i, 0) * CFrame.new(p.Size.X/-2,0,0)) p.CFrame = newframe end end
RunAnimation(Workspace.DoorName) |
|
|
| Report Abuse |
|
|