Trying to make an AI Goalkeeper

Right now I’m making a soccer game, and I really want the goalkeeper to be an npc. Something similar to these two games.

They both have AI goalkeepers and I am heavily inspired by them. Pretty much the goalkeeper would be in the direction of the ball.

1 Like

Calculate the radius between the NPC and the ball and try to have the NPC go as close to the ball as possible in either the z direction or the x direction (whichever one is sideways) since you don’t want the NPC to come out of the goalpost/forward, you just want to move it either left or right.

To move it, you could either do a CFrame animation or a tween animation (I’d recommend CFrame for better physics).

Do you know any videos on how to make it move sideways facing the ball?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.