Bullet is spawned but wouldnt move(AddForce)

I made sure there is no collision between the character that shoots the bullet and the bullet by distancing the spawn point more than enough just to be safe, the prefab’s is Kinematic box is unchecked, and tried using more force(still wouldnt work), my floor is just a scaled cube so friction etc is not a problem and yes the bulletPrefab is declared var bulletPrefab: Transform and is not empty, but the addforce still wouldnt work(the bullet is spawned but wouldn t move). If you have any ideas how to fix this, I would greatly appreciate it.
Also I am using Javascript and here is the problem:

Your code above is using the class name “Rigidbody” instead of the “rigidbody” variable in the game object. This won’t even compile. I ran a quick test with your code above, and it worked fine. Start by creating a new scene with just the spawn point, and this script and see if you get the same behavior. Also you can add an OnCollision() {Debug.Log(“I collided”)} to your script to make sure you are not hitting anything.

BTW, rather than posting code as an image, use the 101/010 button to format the code.

Try setting the Kinematic in code

 bullet.Rigidbody.isKinematic = false;

I realize you said that it was set, but I have had times where other code reset it.
Another suggestion is to in playmode, pause the game after the bullet is fired and verify that the Kinematic is unset. If it is set, turn it off and see if the bullet at least falls. My bet is that it IF it is set, it will either fall, or get reset meaning other code is setting that value.
Good luck

I tried setting it false in code, it didnt work, then I paused it in playmode and the iskinematic check box was still unchecked, I guess there s probably something else bothering it, I ll just keep try
ing to figure out what s wrong, thanks a lot though :slight_smile: