Player Controller Script:
When the player takes damage it now instantiates a hitmarker game object onto the players UI. It calls a function on the Hitmarker Script which tells the hitmarker if it is a headshot.

Hitmarker Item Script:
When the hitmarker item prefab is initialized it does a check to see if the hit was a headshot. If the hit was a headshot it changes the colour of the hitmarker red and if it isn't the hitmarker stays white. The script also plays audio and then deletes itself after 0.2 seconds.

Comments