I am trying to make an app where the creatures in the game can wear hats. However I have two problems. The first is to actually place the hat over the appropriate creature and not have someone wear 2 hats, the second is to have them layered properly (So that if a creature with a hat on that walks by another creature, his hat is not also in front of the other creature if he is behind if that makes sense (also attached a picture trying to explain what I mean)).
How do I do this?
I tried to make an example that I uploaded but I got stuck already on the first step by trying to have the hat be on their owner? I am trying to do it with a foreach loop and ID but for some reason it does not work properly :/