gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 01 Sep 2015 09:43 PM |
| How would I rotate a part on its LOCAL Z-Axis with a script? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 01 Sep 2015 09:47 PM |
| blah.CFrame = blah.CFrame * CFrame.Angles(0, 0, RADs) |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
| |
|
|
| 01 Sep 2015 09:51 PM |
local function setrotz(part,z) local old = part.Position part.Anchored = false part.Position = Vector3.new(10000,10000,0) part.RotVelocity = Vector3.new((math.random()-.5)*10,(math.random()-.5)*10,(math.random()-.5)*10) while part.Rotation ~= Vector3.new(0,0,z) do part.Position = part.Position + Vector3.new(0,1,0) wait(.1) end part.Anchored = true part.RotVelocity = Vector3.new(0,0,0) part.Position = old end |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 01 Sep 2015 09:51 PM |
| Now how would I apply this to a BodyRotVelocity? |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2015 09:54 PM |
Dont use my function
What It does is at a constant rotation velocity to a part than waits until its rotation is the rotation you want it to be than returns the part back to you at the desired rotation |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 01 Sep 2015 09:56 PM |
| Ok, well I need a RotVelocity to rotate a part around its local Z-Axis. How would I do this? |
|
|
| Report Abuse |
|
|
| |
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 01 Sep 2015 10:01 PM |
RotVelocities = Global Axis I want = Local Axis
How do I rotate my part around its LOCAL Z-Axis, while in GLOBAL Axis? |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2015 10:02 PM |
| RotVecloity is rotation velocity |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2015 10:03 PM |
You have to subtract it from the global point or whatever
part.CFrame = CFrame.new(10,10,10):ToObjectSpace(part.CFrame) -- Caution: I have no idea what im doing here |
|
|
| Report Abuse |
|
|
gooey333
|
  |
| Joined: 24 Mar 2013 |
| Total Posts: 1208 |
|
|
| 01 Sep 2015 10:03 PM |
| Yes, I know what it is, but I need it to rotate my part around its Z-Axis. How would I do that? lookVector? |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2015 10:28 PM |
um no
do what the first guy said |
|
|
| Report Abuse |
|
|