Veltamax
|
  |
| Joined: 06 May 2012 |
| Total Posts: 368 |
|
|
| 03 Jul 2015 02:58 PM |
What I am trying to do is this: you click a gui, it drops a part (I already have the part variable so no need for that) 10 studs in front of your head at the same height as your head. I have no idea how to use lookVectors so I need a little help. c;
All I need help with is this part:
part.Position (or CFrame) = Vector3.new (or CFrame).new() |
|
|
| Report Abuse |
|
|
clxr
|
  |
| Joined: 30 Jun 2012 |
| Total Posts: 411 |
|
|
| 03 Jul 2015 04:31 PM |
are you trying to set a look vector?
im just here so i dont get fined |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 03 Jul 2015 04:34 PM |
| Part.Position = (Head.CFrame * CFrame.new(0, 0, 10)).p |
|
|
| Report Abuse |
|
|
Veltamax
|
  |
| Joined: 06 May 2012 |
| Total Posts: 368 |
|
|
| 04 Jul 2015 07:54 PM |
| ^That does work, but it doesn't drop it in the direction the character is facing. |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 04 Jul 2015 07:56 PM |
| Part.CFrame = Part.CFrame + (head.lookVector * 10) |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 04 Jul 2015 07:58 PM |
Oh, yeah, mycheeze's method works, he just messed up a bit Should be CFrame.new(0, 0, -10) instead of CFrame.new(0, 0, 10)
Remember, positive Z is facing backwards |
|
|
| Report Abuse |
|
|
Veltamax
|
  |
| Joined: 06 May 2012 |
| Total Posts: 368 |
|
|
| 04 Jul 2015 08:01 PM |
| Okay, thanks a lot guys! It works now. :D |
|
|
| Report Abuse |
|
|