need help with character movement script

the issue is that my void update and void fixed update are not working for some reason. im new but cant figure out how to fix it.

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

public class PlayerMovement : MonoBehaviour
{
    public CharacterController2D controller;
    public float runSpeed = 40f;
   
    float horizontalMove = 0f;
    bool jump = false;


        void Update ()
    {
        horizontalMove = Input.GetAxisRaw("Horizontal") * runSpeed;

        if (Input.GetButtonDown("jump"))
        {
            jump = true;
        }
    }
        void FixedUpdate ()
   
    {

        controller.Move(horizontalMove * Time.fixedDeltaTime, false, false);
        jump = false;
    }
}

2 things:

Did you attached the script to the player GameObject?

Put in a Debug.Log in both the Update and FixedUpdate to verify they are running (you can see in the Console window the messages they output).


these are the error messages sorry i forgot and yes its set to the player GameObject that’s how I created it

OMG i figured it out. somehow i duplicated the script into a random file in my assets and i just found it and deleted it. my guess is it didn’t work because they had the same name and same property’s.