why won't my player move?

I’m new to Unity. I’m working on two different projects. In both projects i aaded the component “Player Controller” (First person controller in one) but in both projects, the player objects won’t move. what am i doing wrong

Go to Assets>Import Package>Character Controller. Then import all or choose whatever you want. After its imported, check in the project panel, you must see a folder named standard assets. Open it up, drag the first person controller to your scene and see settings of first person controller then setup your controller as in the standard assets.

Hello! I think you are talking about character controller. Well you see, simply adding the character controller won’t do anything, you have to attach some scripts to the objects you want to move and specify in those scripts how you want to move your gameobject, you haven’t really provided the script or any such details which can help us answer, if you post the script that you are using to change the position of the gameobject you want to move then that would help others answer your question, but if you haven’t attached any script, then I think that’s the problem…!

Actually the code if your using simple player Techniques then use
Rigidbody! theres a simple code tutorial and it will tell you everything :smiley:
So your really into a big situation? then just follow other tutorials that are more advanced!

Try This Code but make shure you Character has a 2DRigidbody and a 2DBoxcollider and watch out that the script has the name "Character2DController "

also check out my Youtube there i make Tutorials too name:“MasterGreenStudios”

i hope it will help you ;))

using UnityEngine;

public class Character2DController : MonoBehaviour
{
public float MovementSpeed = 1;
public float JumpForce = 1;
public Animator animator;
private bool facingRight;

private Rigidbody2D _rigidbody;
void Start()
{
    facingRight = true;
    _rigidbody = GetComponent<Rigidbody2D>();
}
        
void Update()

{
    if (Input.GetAxis("Horizontal") < 0)
   {
       transform.localScale = new Vector2 (-1.5f, transform.localScale.y);
    }
    if (Input.GetAxis("Horizontal") > 0)
    {
        transform.localScale = new Vector2(1.5f, transform.localScale.y);
    }

    var movement = Input.GetAxis("Horizontal");

    transform.position += new Vector3(movement, 0, 0) * Time.deltaTime * MovementSpeed;

    animator.SetFloat("Movement Speed", Mathf.Abs(movement));

    {

    }

    if ((Input.GetKeyDown(KeyCode.UpArrow) || Input.GetKeyDown(KeyCode.W) || Input.GetButtonDown("Jump")) && Mathf.Abs(_rigidbody.velocity.y) < 0.001f)
    {
        _rigidbody.AddForce(new Vector2(0, JumpForce), ForceMode2D.Impulse);
    }
}

}