I cant enter playmode in Unity

Hey guys i can’t enter play mode in unity. I have no compiler errors but it keeps saying I have to fix the errors. but I don’t have any.
Please help :slight_smile:
sorry guys I’ll put my script up

here you go

using UnityEngine;

public class PlayerMovement : MonoBehaviour
{
public float speed = 6f;

Vector3 movement;
Animator anim;
Rigidbody playerRigidbody;
int floorMask;
float camRayLength = 100f;

void Awake()
{
	floorMask = LayerMask.GetMask ("Floor");
	anim = GetComponent <Animator> ();
	playerRigidbody = GetComponent<Rigidbody> ();
}

void FixedUpdate()
{
	float h = Input.GetAxisRaw ("Horizontal");
	float v = Input.GetAxisRaw ("Vertical");

	Move (h, v);
	Turning ();
	Animating (h, v);

}

void Move (float h, float v)
{
	movement.Set (h, 0f, v);

	movement = movement.normalized * speed * Time.deltaTime;

	playerRigidbody.MovePosition (transform.position + movement);
}

void Turning()
{
	Ray camRay = Camera.main.ScreenPointToRay (Input.mousePosition);

	RaycastHit floorHit;

	if (Physics.Raycast (camRay, out floorHit, camRayLength, floorMask)) 
	{
		Vector3 playerToMouse = floorHit.point - transform.position;
		playerToMouse.y = 0f;

		Quaternion newRotation = Quaternion.LookRotation (playerToMouse);
		playerRigidbody.MoveRotation (newRotation);
	}
}

void Animating(float h, float v)
{
	bool walking = h != 0f || v != 0f;
	anim.SetBool ("IsWalking", walking);
}

}

Might be worth checking to see if h or v are null before calling functions on them? I’m not sure what would happen if you called functions in that way with null values.

I’m sorry ahah I didn’t understand what you said. can you show me where i did wrong and maybe you can show me how to fix it :slight_smile: