|
| 05 Mar 2015 12:44 PM |
| How would you rotate a brick in script? |
|
|
| Report Abuse |
|
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
|
| 05 Mar 2015 12:46 PM |
| part.Rotation = Vector3.new(0,0,0) |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2015 12:47 PM |
| part.CFrame = part.CFrame * CFrame.Angles(1, 1, 1) |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2015 12:54 PM |
| I want to rotate so it faces down the way, is that possible? |
|
|
| Report Abuse |
|
|
anaIyze
|
  |
| Joined: 29 May 2014 |
| Total Posts: 2048 |
|
| |
|
IoIiderp
|
  |
| Joined: 05 Feb 2012 |
| Total Posts: 8613 |
|
| |
|
|
| 05 Mar 2015 01:14 PM |
| I want to rotate it so it slightly faces to the ground |
|
|
| Report Abuse |
|
|
anaIyze
|
  |
| Joined: 29 May 2014 |
| Total Posts: 2048 |
|
|
| 05 Mar 2015 01:15 PM |
| part.cframe=part.cframe*cframe.angles(0,0,math.rad(-30)); |
|
|
| Report Abuse |
|
|
| |
|
anaIyze
|
  |
| Joined: 29 May 2014 |
| Total Posts: 2048 |
|
| |
|
|
| 05 Mar 2015 01:23 PM |
part.CFrame = part.CFrame * CFrame.Angles(0, 1.5, 0)
I've rotated it around 90 but I want to also rotate it so it faces the ground slightly |
|
|
| Report Abuse |
|
|
anaIyze
|
  |
| Joined: 29 May 2014 |
| Total Posts: 2048 |
|
|
| 05 Mar 2015 01:25 PM |
| do you know how to use radians? |
|
|
| Report Abuse |
|
|
| |
|
anaIyze
|
  |
| Joined: 29 May 2014 |
| Total Posts: 2048 |
|
|
| 05 Mar 2015 01:38 PM |
math.rad = radians don't feel like explaining - go here http://lua-users.org/wiki/MathLibraryTutorial & my example works fine |
|
|
| Report Abuse |
|
|
|
| 05 Mar 2015 01:42 PM |
math.rad() takes a certain number of degrees and turns them into radians, because most people don't memorize radian "translation", and prefer to work with degrees.
The arg you send to math.rad() (i.e. 30) is the number of degrees you want converted to radians.
|
|
|
| Report Abuse |
|
|