The toolbar in the bottom screen [1 2 3 4 5 6 7 8 9 0]

For example: 1 - Sword 2 - Shield

Then I change switch the order 1 - Shield 2 - Sword

If player dies, and respawns 1 - Sword 2 - Shield

I've been trying to attempt many ways but it doesn't work. Any ways on how to do this?

Thanks