|
| 11 Feb 2015 05:16 PM |
How would I do this? I tried doing this, but it said 'p' cannot be assigned to.
local cf = CFrame.new(0, 2, 0) * CFrame.Angle(0, 0.5, 0) local v3 = Vector3.new(0, 10, 0)
cf.p = v3 |
|
|
| Report Abuse |
|
|
anaIyze
|
  |
| Joined: 29 May 2014 |
| Total Posts: 2048 |
|
|
| 11 Feb 2015 05:24 PM |
| what the hell are you doing |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2015 05:26 PM |
| I don't want to reset the rotation of the CFrame |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2015 05:26 PM |
Oh I see
Hes trying to change the CFrame's first three numbers (the position), completely, and keep the rotation.
This is a terrible way but it works:
local rotation = cf - cf.p local newcf = cf+v3 |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 11 Feb 2015 05:32 PM |
the .p of a CFrame is read-onlys
^ above should work |
|
|
| Report Abuse |
|
|
|
| 11 Feb 2015 05:54 PM |
cf = cf - cf.p + v3
~Upload code to codepad-dot-org with Lua syntax highlighting to preserve indentation and make it easier to read!~ |
|
|
| Report Abuse |
|
|