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 » Scripting Helpers
Home Search
 

Re: How to rotate a part in script?

Previous Thread :: Next Thread 
SergeantAtlanta is not online. SergeantAtlanta
Joined: 04 Aug 2012
Total Posts: 357
23 Jun 2013 12:14 PM
How do you rotate a part in a script to your choice? Anyone know, please tell!
Report Abuse
tigerr666 is not online. tigerr666
Joined: 13 Aug 2009
Total Posts: 1665
23 Jun 2013 12:14 PM
Velocity.
Report Abuse
SergeantAtlanta is not online. SergeantAtlanta
Joined: 04 Aug 2012
Total Posts: 357
23 Jun 2013 12:15 PM
So how is it told in script form?
Report Abuse
Ekkoh is not online. Ekkoh
Joined: 22 Oct 2012
Total Posts: 524
23 Jun 2013 12:15 PM
No... not with velocity... it's called CFrame. Try this code out and play with it a little.

Part.CFrame = Part.CFrame * CFrame.new(0, .5, 0)
Report Abuse
SergeantAtlanta is not online. SergeantAtlanta
Joined: 04 Aug 2012
Total Posts: 357
23 Jun 2013 12:18 PM
Okay so your script obviously moves the part with CFrame so I need to find out how to rotate it?
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
23 Jun 2013 12:25 PM
function Rotate(p,x,y,z)
p.CFrame = p.CFrame * CFrame.Angles(math.rad(x),math.rad(y),math.rad(z))
end

Rotate(Workspace.Part,0,180,0)

this would put the part upside down.
Report Abuse
SergeantAtlanta is not online. SergeantAtlanta
Joined: 04 Aug 2012
Total Posts: 357
23 Jun 2013 12:36 PM
Thanks notspownedg, this is great!
Report Abuse
neverhammer is not online. neverhammer
Joined: 13 Sep 2009
Total Posts: 963
23 Jun 2013 12:39 PM
Theres actually quite a few different ways to rotate a part
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
23 Jun 2013 12:46 PM
There's a new property of a BasePart (all physical parts) called Rotation.

Workspace.Part.Rotation = Vector3.new(0,0,0)
Report Abuse
tigerr666 is not online. tigerr666
Joined: 13 Aug 2009
Total Posts: 1665
23 Jun 2013 12:53 PM
Guys, he wants a part to rotate, like 3D rotate. Ya know, when you enter a popular game lobby, and theres several bricks just rotating in place. He doesn't want to rotate a part once, then have it do nothing.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
23 Jun 2013 12:57 PM
Rotation property :0
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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