How do I angle a projectile to hit a player

I am trying to make a mortar for my game and am unsure of how to angle the center to shoot the player. The speed of the projectile will always be the same when it leaves the barrel so then the mortar must angle either lower or higher to hit the player. I found this forum post on something similar, but since the direction of the projectile is decided by the angle of the center of the mortar I don’t know how to apply it. Here is the pseudo-code:

if a player exists and is within the attack range (20) studs
the base the turret will turn towards the player (I already have this)
the center of the mortar will angle so that when it shoots a projectile the projectile will hit player (I don’t have this)

Mortar - Roblox <–M Model of what I have sofar
Modeling a projectile's motion ← Article I am trying to use

Hey! TheDevKing sort of did a tutorial on this:
(2) Advanced Roblox Scripting Tutorial #24 - Raycasting (Beginner to Pro 2019) - YouTube

If you want the projectile to look at the player position, then you could use CFrame.lookAt(where, lookAt)
Example:
CFrame.lookAt(projectile.Position, player.Character.HumanoidRootPart)

No, he did not, mine uses parts that are affected by gravity and not heading in a straight line.

@DanilochRBX

[quote=“Its4Realzies, post:5, topic:1196905”]
Since the parts this mortar is shooting are affected by gravity its not that simple. I need a way to angle it up or down based on how far away the player is so that is will hit player
[/quote] Since the parts this mortar is shooting are affected by gravity its not that simple. I need a way to angle it up or down based on how far away the player is so that is will hit player