There is no 'Rigidbody' attached to the "Player"

MissingComponentException: There is no ‘Rigidbody’ attached to the “Player” game object, but a script is trying to access it.
You probably need to add a Rigidbody to the game object “Player”. Or your script needs to check if the component is attached before using it.,MissingComponentException: There is no ‘Rigidbody’ attached to the “Player” game object, but a script is trying to access it.
You probably need to add a Rigidbody to the game object “Player”. Or your script needs to check if the component is attached before using it.

it’s a 2d game, you should attach Rigidbody2D not RigidBody.

add a rigidbody2d, not a regular rigidbody. also, instead of getting a rigidbody component, get a rigidbody2d component.

Rigid2D = GetComponent<RigidBody2D> ();