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 » Game Design
Home Search
 

Re: how do u rotate a door

Previous Thread :: Next Thread 
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
25 Oct 2015 12:00 PM
with scripting... so it opens.
Report Abuse
Cytheur is not online. 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
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
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
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
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
DerpyMerpKing is not online. DerpyMerpKing
Joined: 05 Feb 2011
Total Posts: 2553
25 Oct 2015 02:46 PM
YES! FIGURED IT OUT!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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