Is it possible for you to make an AI boat that shoots cannons

Note: Please keep in mind I am a young developer, the topic I may be on may not be the right topic. Maybe my grammar is bad. Please notify me if I’m doing anything wrong.

  1. What do you want to achieve? Keep it simple and clear!

I’m trying to make it so there is a boat AI that can shoot a cannon once it gets close enough to a player.

  1. What is the issue? Include screenshots / videos if possible!

I simply can’t do it. I’ve already tried multiple methods

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

What I’ve done is try to use a humanoid. Then without a humanoid, Using different scripts and each one.

Yes this is completely possible, first you’d need to setup a loop that would make the canon constantly look for the closest player and when there is a closest player found you would make the canon rotate to face this closest player and then, have it shoot a canon after locating a player however many seconds after a player has been located and then of course have a cooldown for it

how would I make it move though? I use a Move:To() function to move the boat, but it doesn’t make the boat face the player.