Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Make Part shoot towards to something?

Asked by 7 years ago

Please include the code which you are trying to use, so the community will be better-equipped to help you with your problem.

I want to make a part willingly move up, down, left, or right just towards a part, i want it to swing at it such as a NPC aimming at it with a gun and then shooting, but the bullet doesn't follow, instead, the NPC aims and then the bullet is shot in the direction of the player where the player was at when the bullet was shot. However, I don't understand what I must use to achieve this.

0
gg minikitkat 687 — 7y
0
This is where vectors are useful. The bullet should move in the direction of some vector v. This vector v should point from the gun to the target player. Therefore, v = player.Position - gun.Position. Does this help? script_help 74 — 7y
0
Thanks, I am not very skilled in math. Do I make the bullet follow to the given position? ScriptingsMyThing 0 — 7y

Answer this question