Godot Version
4.2.2
Question
I am currently trying to make a gun in Godot. The gun is a separate scene from the player scene, but is added as a child of the player scene. I currently have an input for shooting, which is meant to trigger the gun to shoot out an instance of a bullet (a separate scene). I have the bullet speed set up, as well as the code to trigger the gun. However, I cannot figure out how to run the function that shoots the bullet that is attached to the gun from within the player script. How do I run a function from another script that belongs to a child of the main scene?
There are three different scripts. One is for player movement and input, one is for making the bullet move always, and the third is for creating an instance of the bullet on the gun. I know how to create an instance of the bullet on the gun, I need help with triggering that function from the player movement and input script. Feel free to ask me any questions and extra details you need.