florodude
|
  |
| Joined: 20 Jan 2009 |
| Total Posts: 240 |
|
|
| 03 Apr 2017 03:12 PM |
Hey all,
I'm currently creating a projectile of sorts. It's a part that I'd like to spawn in front of the player (I've scripted this part successfully) and move in front of the player. I have it so it will move in a direction like so:
part.Position = part.Position + Vector3.new(0,5,0)
The problem as most of you will pick up on is that it moves that part a certain direction regardless of player's view.
Any help would be welcomed. |
|
|
| Report Abuse |
|
Railmints
|
  |
| Joined: 11 Aug 2014 |
| Total Posts: 272 |
|
|
| 03 Apr 2017 03:16 PM |
you can use the players torsos look vector as a direction like~~
game.Players.LocalPlayer.Torso.CFrame.lookVector
then make a body velocity object and make its speed the same value as the look vector. Theres more ways to do it than just one. |
|
|
| Report Abuse |
|
| |