Bullet.tscn not spawning where it's supposed to

Godot Version

4.3.Stable

Question

This is the function. It does what it’s supposed to… sort of. It spawns either high up or too far.

Here’s the code snippet:

func spawnPistol_bullets():
    var pistolProjectile = bullet_scene.instantiate()
    
    add_sibling(pistolProjectile)
    
    pistolProjectile.transform = pistolBulletSpawn.global_transform
    pistolProjectile.linear_velocity = pistolBulletSpawn.global_transform.basis.z * -1 * bullet_speed

Check its position in its own scene first.

Your problem is likely here:

pistolProjectile.transform = pistolBulletSpawn.global_transform

Look closely for consistency…

In the bullet scene, it’s at 0,0,0.