|
| 22 May 2014 05:28 AM |
I don't like CFrame right now. ;_; I though I had fixed my script but when I set the position it resets the rotation. What do I do to keep the position and rotation?
t is the character's torso.
p.CFrame=CFrame.Angles(math.pi/2,0,0) p.CFrame=CFrame.new(t.CFrame.X,t.CFrame.Y,t.CFrame.Z)
~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~ |
|
|
| Report Abuse |
|
|
roxmat
|
  |
| Joined: 10 Jun 2011 |
| Total Posts: 66 |
|
|
| 22 May 2014 05:31 AM |
| So explain more. What is this meant to do? |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 05:32 AM |
It is supposed to rotate a part by 90 degrees and sets the position to the character's torso.
~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~ |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 05:37 AM |
Hello?
~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~ |
|
|
| Report Abuse |
|
|
roxmat
|
  |
| Joined: 10 Jun 2011 |
| Total Posts: 66 |
|
|
| 22 May 2014 05:37 AM |
Well nice job doing it like this xD: p.CFrame=CFrame.new(t.CFrame.X,t.CFrame.Y,t.CFrame.Z)
Remember CFrame is for positioning and rotation(Of course you know)
Do it like this: p.Position = t.Position --Maybe + Vector3.new(0,0,3) |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 05:40 AM |
But wouldn't it go on the player's head?
~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~ |
|
|
| Report Abuse |
|
|
roxmat
|
  |
| Joined: 10 Jun 2011 |
| Total Posts: 66 |
|
|
| 22 May 2014 05:42 AM |
| 100% no. But try to see if it is fixed. :) |
|
|
| Report Abuse |
|
|
bradz234
|
  |
| Joined: 02 Aug 2009 |
| Total Posts: 31 |
|
|
| 22 May 2014 05:51 AM |
p.CFrame=CFrame.new(t.CFrame.X,t.CFrame.Y,t.CFrame.Z) * CFrame.Angles(math.pi/2,0,0)
|
|
|
| Report Abuse |
|
|
roxmat
|
  |
| Joined: 10 Jun 2011 |
| Total Posts: 66 |
|
|
| 22 May 2014 05:54 AM |
Ah, Yeah I was going to suggest what brad did.
Forget mine. Use brads' |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 06:20 AM |
Works now, ty brad.
~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~ |
|
|
| Report Abuse |
|
|
bradz234
|
  |
| Joined: 02 Aug 2009 |
| Total Posts: 31 |
|
|
| 22 May 2014 06:28 AM |
| For the record, Im Wreckerbuster67. I got 1 day banned. :c |
|
|
| Report Abuse |
|
|
|
| 22 May 2014 06:31 AM |
Aww... for what? (PM me that so you don't get banned on your alt.)
~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~ |
|
|
| Report Abuse |
|
|