Bullet Not Working

When I press the space bar, a bullet is supposed to spawn and start flying off. But instead, a bullet spawns and then stays put. This problem is only true for the player though, and not other objects I have spawning bullets. Their bullets spawn and fly off like they’re supposed to. The bullets have a constant relative force of 100 z, a drag of 10, and an angular drag of 0.05. Here is my script that spawns the bullets:

using UnityEngine;
using System.Collections;

public class BulletController : MonoBehaviour {

    public GameObject BulletSpawn;
    public GameObject Bullet;
    void Update()
        if (Input.GetKeyDown("space") == true)
            Instantiate(Bullet, BulletSpawn.transform.position, BulletSpawn.transform.rotation);

Here is a picture of my original bullet’s components:

And here is a picture of the clone’s components:
(I don’t know how to insert images)

What is wrong with my bullets?

Do you have a script on the bullets that gives them the force? It’s kind of hard to say without seeing other than your spawning script, which looks fine. If you do have a script giving the bullets force, check the inspector that any public values are correct.

Also just a guess, but your bullets might collide with the player hitbox and stopping instantly because of that. Try disabling the hitboxes on bullets and test it out. If this is the case, you can then disable collision detection between two objects using Unity - Scripting API: Physics.IgnoreCollision
or just simply by moving the bullet spawning point outside the player collider.

Use Rigidbody.Addforce or Rigidbody.velocity that usually works.

Just a side note what might cause the problem is that you have gravity on but constraint movement on the y-axis. So this might conflict with the movement.
As for the bullet’s movement maybe try adding a script to the bullet using something like.
rigidbody.addForce(vector.forward * projectilespeed, Forcemode.Force);

Something like this let me know I’d like to help :smiley: