Trying to have the enemy hit the player but the type or namespace name could not be found.

Im tryin to have code where it tests if the enemy hit the Player object and storing it in a variable using(Player player = hitInfo.GetComponent() I did something similar with my bullet object where it tests for an enemy and that works fine(Enemy enemy = hitInfo.GetComponent() The error it gives is type or namespace name could not be found(are you missing a using directive or an assembly reference?). I looked into other people with the same error and didnt see any information that could help me? Does anybody know how to fix this.

if you read the whole error it tells you the problem