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
 

Motor Problem

Previous Thread :: Next Thread 
Amudeash is not online. Amudeash
Joined: 22 Jan 2011
Total Posts: 842
23 Mar 2015 04:05 PM
How do I make the DesiredAngle rotate by the Y axis?
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
23 Mar 2015 04:05 PM
Rotate the axes of C0 and C1.
Report Abuse
kingkiller1000 is not online. kingkiller1000
Joined: 12 Dec 2008
Total Posts: 26415
23 Mar 2015 04:12 PM
I should have explained better. By default, the axis of rotation goes straight down the Z axis. Thus, to get it to go straight down the Y axis, you need to rotate it 90 degrees around the X axis. Whether this angle should be positive or negative depends on the direction you want it to spin.

Weld.C0 = CFrame.new() * CFrame.Angles(math.pi/2, 0, 0) --Will cause it to spin clockwise if you look down from the origin. If this is the wrong way, do -math.pi/2 instead.

Apply the same angle to C1.
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