Language

GameObject.FindWithTag not working

Hello i have a script that counts score and a script on chests that tries to access that score script on the player. There are multiple chests and they are being instantiated in the Start Function.
But when i try to access the PLayer score scirpt it doesnt find it. The player is tagged with Player.
What am i doing wrong?

If it didn't find the player then the GetComponent in the first line would generate a null reference exception. If this is not the case then FindWithTag is working fine and your problem lies elsewhere.