How do I fix this?

I try to make a topdown game where movement and shooters are controlled by the keyboard. But my Bullets don’t even move.
This is my player script:

using System.Runtime.Serialization;
using System. Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerController: MonoBehaviour
{
    [SerializeField] 
    Bullet,Copy;
    [SerializeField]
    private float speed,Cooldown,BigCooldown;

    [SerializeField]
    private float rotationSpeed;
    [SerializeField]
    private Transform SpawnPoint;
    float Temp;
    int Turn;
    void Update()
    {
        float horizontalInput = Input.GetAxis("Horizontal");
        float verticalInput = Input.GetAxis("Vertical");

        Vector2 movementDirection = new Vector2(horizontalInput, verticalInput);
        float inputMagnitude = Mathf.Clamp01(movementDirection.magnitude);
        movementDirection.Normalize();

        transform.Translate(movementDirection * speed  *inputMagnitude* Time.deltaTime, Space.World);

        if (movementDirection != Vector2.zero)
        {
            Quaternion toRotation = Quaternion.LookRotation(Vector3.forward, movementDirection);
            transform.rotation = Quaternion.RotateTowards(transform.rotation, toRotation, rotationSpeed * Time.deltaTime);
        }
        if(Input.GetKey(KeyCode.Space))
        {
            if(Temp<=0)
            {
                Shoot();
                Temp = Cooldown;
            }
        
        }
        Temp -=Time.deltaTime;
    }
    private void Shoot(){
        Copy = Instantiate(Bullet,SpawnPoint.position,SpawnPoint.rotation);
        Copy.destroy();
    }
}

This is my Bullet script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Bullet : MonoBehaviour
{
    [SerializeField] private Transform Direction;
    [SerializeField] private float speed;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        transform.Translate(Vector3.forward * speed);
    }
    public void destroy(){
        Destroy(gameObject,10f);
    }
}

How do I fix this?

Hi,

It seems like you did not change speed variable’s value. By default number types like float starts with 0, so your code is equal to this:

 public class Bullet : MonoBehaviour
 {
     [SerializeField] private Transform Direction;
     [SerializeField] private float speed = 0;
     // Start is called before the first frame update
     void Start()
     {
         
     }
 
     // Update is called once per frame
     void Update()
     {
         transform.Translate(Vector3.forward * speed); // Vector3.forward * 0 = 0 - not moving at all
     }
     public void destroy(){
         Destroy(gameObject,10f);
     }
 }

Set it to some non-sero value and it should work just fine.