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 » Scripters
Home Search
 

Doors

Previous Thread :: Next Thread 
dude10000009 is not online. dude10000009
Joined: 23 Nov 2010
Total Posts: 809
23 Aug 2017 10:45 PM
I was making a door then got stumped, because i have no idea how to set the point of rotation so that i can use cframe to smoothly swing the door open to a certain rotation.

(This is all going into a script as you can see)

Any ideas because i looked at some answers but they seem to be obsolete or broken.


"Google is handy, give it a try." - Discord: XpNNmjc
Report Abuse
graveyardposse is not online. graveyardposse
Joined: 23 Oct 2008
Total Posts: 2565
23 Aug 2017 10:48 PM
rotate the door to the position and rotation you want it to finish at then print and copy the output then move it back and print that and just use the 2 outputs as vars, that's the hard-coded/non-mathematical way of doing it
Report Abuse
dude10000009 is not online. dude10000009
Joined: 23 Nov 2010
Total Posts: 809
23 Aug 2017 10:49 PM
But it'll look ugly if i'm using lerp to smoothly rotate it.


"Google is handy, give it a try." - Discord: XpNNmjc
Report Abuse
graveyardposse is not online. graveyardposse
Joined: 23 Oct 2008
Total Posts: 2565
23 Aug 2017 10:50 PM
if u want to do the math be my guest but i do that when i don't plan on moving an object or making more of the same object
Report Abuse
tbnj123 is online. tbnj123
Joined: 29 Oct 2010
Total Posts: 443
23 Aug 2017 10:50 PM
primary part, setprimarypartcframe
Report Abuse
dude10000009 is not online. dude10000009
Joined: 23 Nov 2010
Total Posts: 809
23 Aug 2017 10:56 PM
I'm rotating a single part.^


"Google is handy, give it a try." - Discord: XpNNmjc
Report Abuse
zectec is not online. zectec
Joined: 24 Sep 2012
Total Posts: 285
23 Aug 2017 10:59 PM
use tweenservice


Report Abuse
tbnj123 is online. tbnj123
Joined: 29 Oct 2010
Total Posts: 443
24 Aug 2017 12:39 AM
Center = Door.CFrame*CFrame.new(-2,0,0)

local its = 100

for i = 1, its do
Door.CFrame = Center*CFrame.Angles(0,math.rad(90)*i/its,0)*CFrame.new(2,0,0)
wait()
end

manually instead of lerp
best i could come up with
just an example

door was a part, size 5, 8, 1
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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