My rigidbody is glichting

My problem in ONE gif:
GIF HERE

MovementScript

#pragma strict

var speed : float = 5.0;
var realSpeed : float;
var grounded : boolean;
var isCrouch : boolean;

var canRun : boolean = true;
var canCrouch : boolean = true;
var canJump : boolean = true;

var raycastOrigin : Transform;
var layerMask : LayerMask;

var rigidVar : Rigidbody;
var playerAnimator : Animator;
var headAnimator : Animator;
var armsAnimator : Animator;

var jumpForce : float;
var direction : Vector3 = Vector3.zero;
private var hit : RaycastHit;
var dist : float = 1;
private var dir : Vector3;

function Update () {
	var animationDirection : Vector3;
	animationDirection = Vector3(Input.GetAxis("Left/Right"), rigidVar.velocity.y, Input.GetAxis("Backward/Forward"));
	direction = Vector3(Input.GetAxis("Left/Right") * realSpeed, rigidVar.velocity.y, Input.GetAxis("Backward/Forward") * realSpeed);
	playerAnimator.SetFloat("HorizontalAxis", animationDirection.x);
	playerAnimator.SetFloat("VerticalAxis", animationDirection.z);
	playerAnimator.SetFloat("ActualYVelocity", animationDirection.y);
	
	direction = transform.TransformDirection(direction);
	dir = Vector3(0,-1,0);
	Debug.DrawRay(raycastOrigin.position,dir*dist,Color.green);
		if(Physics.SphereCast(raycastOrigin.position,0.3,dir,hit,dist,layerMask)){
			grounded = true;
		
		}else{
			grounded = false;
		}
	
	if(Input.GetButton("Fire1")){
		armsAnimator.SetBool("Shooting", true);
	}else{
		armsAnimator.SetBool("Shooting", false);
	}
	
	if(Input.GetAxis("Run") > 0.1 && !isCrouch && canRun){
		realSpeed = speed * 1.5;
	}else if(isCrouch){
		realSpeed = speed / 1.2;
	}else{
		realSpeed = speed;
	}

	if(Input.GetAxis("Run") > 0.1){
		playerAnimator.SetBool("RunButton", true);
		headAnimator.SetBool("RunButton", true);
	}else{
		playerAnimator.SetBool("RunButton", false);
		headAnimator.SetBool("RunButton", false);
	}
	
	if(direction.x != 0 && direction.z != 0){
		playerAnimator.SetBool("WalkButton", true);
		headAnimator.SetBool("WalkButton", true);
	}else{
		playerAnimator.SetBool("WalkButton", false);
		headAnimator.SetBool("WalkButton", false);
	}
	
	if(isCrouch){
		playerAnimator.SetBool("IsCrouching", true);
		headAnimator.SetBool("IsCrouching", true);
	}else{
		playerAnimator.SetBool("IsCrouching", false);
		headAnimator.SetBool("IsCrouching", false);
	}
	
	if(grounded){
		playerAnimator.SetBool("IsOnTheGround", true);
		headAnimator.SetBool("IsOnTheGround", true);
	}else{
		playerAnimator.SetBool("IsOnTheGround", false);
		headAnimator.SetBool("IsOnTheGround", false);
		isCrouch = false;
	}
	if(Input.GetButtonDown("Jump")){
		if(grounded && canJump && !isCrouch){
			rigidVar.AddForce(0,jumpForce * 100,0, ForceMode.Impulse);
			playerAnimator.SetBool("JumpButton", true);
		}else{
			playerAnimator.SetBool("JumpButton", false);
		}
	}else{
			playerAnimator.SetBool("JumpButton", false);
	}
	
	if(Input.GetButtonDown("Crouch") && canCrouch && grounded){
		isCrouch = !isCrouch;
	}
}

function FixedUpdate(){
	var realDirection : Vector3 = Vector3(direction.x * realSpeed, 0, direction.z * realSpeed);
	rigidVar.MovePosition(transform.position + realDirection * Time.deltaTime);
}

My guess(based on me having this exact problem , your script and the gif) is that:
the force of the explosion acts on your rigid body’s mass. Your rigid body has less linear drag (“friction if you will”)than mass and therefore is slow at counter acting the force , making you slide as if on ice. What solved this for me is bring my linear drag,etc up (or close)to my mass value ,allowing my player to counter act the force.

Linear drag value is found in the rigid body component itself straight under mass :).

Hey ,I’m not very experienced, but I have had the same problem , and for me it was that the mass of my rigid body was much higher than the linear/angular drag of it , therefore any small force would send me flying(almost) forever. What I can guess from the gif and script is that the force from the explosion is sending you flying and you don’t have the linear drag or “friction” if you will to deal with it. That’s just my take on it :D.