eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 25 Nov 2011 10:47 AM |
| If I use CFrame.new(Vector3.new(x,y,z)), the part's rotation becomes 0. So I want to change a part's CFrame Position without changing the rotation. How could I do it? |
|
|
| Report Abuse |
|
|
sncplay42
|
  |
| Joined: 27 Nov 2008 |
| Total Posts: 11891 |
|
|
| 25 Nov 2011 10:49 AM |
| part.CFrame = part.CFrame + Vector3.new(x, y, z) - part.CFrame.p |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
| |
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 25 Nov 2011 10:54 AM |
| Thanks, I discovered a new property xD |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 25 Nov 2011 11:00 AM |
Oh, errors:
Output: p cannot be asigned to
What's wrong? I've never seen that error before. |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
| |
|
killjoy37
|
  |
| Joined: 27 Aug 2008 |
| Total Posts: 2821 |
|
|
| 25 Nov 2011 04:16 PM |
This is what i use:
part.CFrame = part.CFrame + Vector3.new(x, y, z) |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
|
| 25 Nov 2011 04:27 PM |
That adds a Vector3 value to the actual position. I want it to change to a position... Like this: part.CFrame = CFrame.new(Vector3.new(x,y,z)) --But this changes the rotation too
Not this: part.CFrame = part.CFrame + Vector3.new(x,y,z)
That's the problem I want to change the CFrame position without changing the rotation. |
|
|
| Report Abuse |
|
|
Wil2
|
  |
| Joined: 01 Feb 2008 |
| Total Posts: 728 |
|
|
| 25 Nov 2011 04:44 PM |
try this: part.CFrame = part.CFrame*CFrame.new(x,y,z) |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2011 04:46 PM |
| I reccomend the CmdUtl its like.. AWSOME!!1 |
|
|
| Report Abuse |
|
|
agent767
|
  |
| Joined: 03 Nov 2008 |
| Total Posts: 4181 |
|
|
| 25 Nov 2011 04:53 PM |
sncs script was correct. You propablyy tried to change CFrame.p and that`s why the script errored.
vector = Vector3.new(x,y,z) <----- the new position of the part part.CFrame = part.CFrame + vector - part.CFrame.p |
|
|
| Report Abuse |
|
|
|
| 25 Nov 2011 05:49 PM |
| theresis like 2 difffernts ways i think Vector,MoveTo |
|
|
| Report Abuse |
|
|
eJorge
|
  |
| Joined: 09 Jun 2011 |
| Total Posts: 5966 |
|
| |
|