I’m aware there are many similar topics here already, although I am still a bit confused with it.
I’m trying to make my canon spawn a projecttile and shoot it towards player. Now, I have done the first part already :
local player = self:GetClosestPlayer() if player then local bullet = projectTile:Clone() bullet.Position = self.Pos.Position bullet.Parent = self.Pos --Apply force to the bullet part towards the player. end
I would like the part to always hit the player and when it does subtract player health, Is using physics force here a good approach? How could I calculate the direction and fire the bullet towards the player? Would I check If the bullet hits the player with like a touched event or just subtract it when the bullet is fired since it needs to always hit and be quite fast?