First Person Controller Script not working

Hello, I am using standard assets for first person controller. when I drag the FPS prefab onto the scene, it says ‘the associated script cannot be loaded. Please fix any compile errors and assign a valid script’.
Pls help thank uu

I am having the same problem, may be due to the new unity editor update.,I have the same problem I am wondering if this is due to the new unity editor update.

I had the same problem and this answer really helped

hay this is how I do first person controller with mouse look

create a empty object (call this your “Player” give it the “Player” tag), add character controller, add the player movement script, add as a child a capsule taller than wide ( offset the “Player” at the top of the capsule ), add a second child with camera and the mouse look script (also place at top of capsule)

PlayerMovement:

using System.Collections;
  using System.Collections.Generic;
  using UnityEngine;
  
  public class PlayerMovement : MonoBehaviour
  {
  
      public CharacterController controller;
  
      public float speed = 5f;
      public float gravity = -15f;
  
      Vector3 velocity;
  
      bool isGrounded;
  
      // Update is called once per frame
      void Update()
      {
  
          float x = Input.GetAxis("Horizontal");
          float z = Input.GetAxis("Vertical");
  
          Vector3 move = transform.right * x + transform.forward * z;
  
          controller.Move(move * speed * Time.deltaTime);
              
          velocity.y += gravity * Time.deltaTime;
  
          controller.Move(velocity * Time.deltaTime);
          
      }
  }

Mouse look:

  using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      
      public class MouseLook : MonoBehaviour
      {
      
          public float mouseXSensitivity = 100f;
      
          public Transform playerBody;
      
          float xRotation = 0f;
      
          // Start is called before the first frame update
          void Start()
          {
              Cursor.lockState = CursorLockMode.Locked;
          }
      
          // Update is called once per frame
          void Update()
          {
              float mouseX = Input.GetAxis("Mouse X") * mouseXSensitivity * Time.deltaTime;
              float mouseY = Input.GetAxis("Mouse Y") * mouseXSensitivity * Time.deltaTime;
      
              xRotation -= mouseY;
              xRotation = Mathf.Clamp(xRotation, -90f, 90f);
      
              transform.localRotation = Quaternion.Euler(xRotation, 0f, 0f);
              playerBody.Rotate(Vector3.up * mouseX);
          }
      }
      
     
     
     hope it helps