I need some help with scripting a goalkeeper

Hey! I’m currently working on building a goalkeeper NPC for my soccer (football) game, I might be asking for a bit too much to explain, but how would I have an NPC (dummy) move infront of the ball? Like there is a ball on the right side of the field, the npc goes to the right side of the goal, same for left side etc. If someone shoots left of it, it plays the left dive animation, same for right. I think this is all that I need and I can script the rest myself.

If there is anyone down to help me, I really appreciate you.

1 Like

If you have a good understand of the game and its rules, you can do it.
You have to make an animation for the direction of the shoot then, you have to create an object on the ground which will be your position for the shoot.
After that, you can code a script that check if the player enter in the object, then, you can trigger the animation