Shooting in forward direction.

Hi.
I have an issue with my Wepon script. I want to shoot in direction where my player is turned. But with mi script, I shoot only on world X axis. Bullet flies left or right, depends on the rotation on Y axis. But of course, I want to shoot forward. This is my script. Any ideas?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Weapon : MonoBehaviour
{
    [SerializeField]
    private Transform firePoint;
    [SerializeField]
    private Rigidbody bulletPrefab;

    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.Mouse0))
        {
            Shot();
        }
    }

    private void Shot()
    {
        Rigidbody bullet = Instantiate(bulletPrefab, firePoint.position, firePoint.rotation);
        bullet.AddForce(firePoint.transform.forward * 10, ForceMode.Impulse);
    }
}

Maybe use the weapon’s forward? Now you just use the firepoint’s forward which is just a transform

Still doesn’t work.
Is it possible that using Cinemachine causes this issue?

No, you just need to find what transform.forward you need to use. Getting the forward of the cinemachine also would work probably. You might need to do transform.position + transform.forward, since forward is normalized