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
 

Advanced Motor Control Help

Previous Thread :: Next Thread 
dsteenson is not online. dsteenson
Joined: 05 Jul 2011
Total Posts: 580
20 Jan 2013 03:17 PM
Hey guys,

I'm not that good at scripting....at all....however I would like to control my motors better. Is there a way to make them rotate 90 degrees when you click them? I have a rough idea involving a click detector, however I don't really know the syntax.

-dsteenson
Report Abuse
MeBilly8440 is not online. MeBilly8440
Joined: 27 Jul 2009
Total Posts: 2783
20 Jan 2013 05:01 PM
ClickDetector.MouseClick:connect(function(plr)
motor.CFrame = motor.CFrame * CFrame.Angles(0, 0, math.rad(90)) -- 90 degrees
end)

Hope that's enough to get you started in the right direction.

Wiki Profile: http://wiki.roblox.com/index.php/User:Nelson
Report Abuse
eugenevorld is not online. eugenevorld
Joined: 15 Nov 2008
Total Posts: 310
20 Jan 2013 05:24 PM
If you mean motor as in the object Motor. All you have to do is set the desired angle to be half of pi, math.pi/2 which is 90 degrees in radians. I have a thread about more control over how it rotates and where it pivots and on what angle it pivots here...
http://www.roblox.com/Forum/ShowPost.aspx?PostID=87195696
Report Abuse
dsteenson is not online. dsteenson
Joined: 05 Jul 2011
Total Posts: 580
20 Jan 2013 07:08 PM
You guys are awesome! I'll check this out as soon as I can. Watching the Patriots Vs Ravens now though :p
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