For the sake of clarity, I will call your objects the 'shooter' and the 'shot'. Provided the shooter is in the world, it can add the shot at its current location in the world. The class that creates the shot should have the code that gives its movement. For further assistance, show the code you tried (use the 'code' link below the reply box to insert code into your posts) and provide any error messages you are getting (copy/paste in entirety).
I was trying figure out the code to make the object appear when I press "space" while its moving and then the object will automatically move in the direction the shooter is facing