2.5d sorting layer

I’m making 2.5d game and I want to layering only my player’s part (stickman) and rest of game’s sprites can render with Z axis.

I used sorting layer for the player and order for the player’s parts but result is this

2100084--137492--2.PNG

I wrote my own script

using UnityEngine;
using System.Collections;

public class sorting : MonoBehaviour {
public Transform stickman ;
private Vector3 spritepos ;
private SpriteRenderer sprite ;
public int sortingOrder = 50;
void Start()
{
sprite = GetComponent ();
}
// Update is called once per frame
void Update () {
spritepos = transform.position;
if (spritepos.z < stickman.position.z) {
sprite.sortingOrder = sortingOrder;

}
else {
sprite.sortingOrder = -sortingOrder;
}
}
}

Seen some sorting group example here,

(havent actually tried it so not sure if it does what you need)

my script just works for between 2 sprite , so it is not very work very , how does your script work ? can you help me