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
 

BodyGyro Mouse.Hit Determine only X,Z Rotation

Previous Thread :: Next Thread 
snowbee15364 is online. snowbee15364
Joined: 20 Jun 2011
Total Posts: 47
17 May 2016 09:59 PM
So like the question says, I'm trying to get BodyGyro to only rotate in the X and Z axis in the direction of mouse.hit. Right now I have a loop that rotates my "engine" (Just a part) on the y axis. This line of code appears in a loop while "D" is held down on the keyboard:

engine.BodyGyro.cframe = engine.CFrame*CFrame.Angles(0,-.3,0)

Then I have another line of code while I'm holding my mouse button 1 down:

engine.BodyGyro.cframe = mouse.Hit

How would I have mouse.Hit's X,Z rotational coords affect BodyGyro's cframe in the X,Z direction? Thanks for the help!
Report Abuse
snowbee15364 is online. snowbee15364
Joined: 20 Jun 2011
Total Posts: 47
18 May 2016 02:23 PM
Bump
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