is this writen correctly in c#. i am in the final part of moving the player, but this wont work.

usingUnityEngine;
usingSystem.Collections;

public class PlayerController : MonoBehaviour
{
public float speed;

void FixedUpdate ()
{
float moveHorizontal = Input.GetAxis(“Horizontal”);
float moveVertical = Input.GetAxis(“Vertical”);

Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);

Rigidbody.AddForce(movement * speed * Time.deltaTime);
}
}

Store a rigidbody reference. You can’t use “Rigidbody”, because Unity doesn’t know which rigidbody you’re talking about. You have to specify that it’s the one belonging to the game object your script is on using GetComponent.

private Rigidbody rigidBody;

private void Start()
{
    rigidBody = GetComponent<Rigidbody>();
}

private void FixedUpdate()
{
    float moveHorizontal = Input.GetAxis("Horizontal");
    float moveVertical = Input.GetAxis("Vertical");

    Vector3 movement = new Vector3(moveHorizontal, 0.0f, moveVertical);
    rigidBody.AddForce(movement * speed * Time.deltaTime);
}

thank you so much. this is for a class project, so far im the most advanced, so basically not that much.

what is a Parsing error

Parsing error usually means there’s some text in your script that the compiler doesn’t know what to do with. If you have one that you can’t figure out, show the code.

i fixed it. but thanks :slight_smile: