Acces object in scene, not prefab

Hi, im using this variable that is inside an object:

" var Script = GameObject.FindWithTag(“Player”);

Script.GetComponent(playerhambre2beta).hambre -= cantidad; "

It acces an script that the player have. It works great when objects are in scene, there is no problem to find the player. But when I instantiate this objects, they look to the player prefab and not the player in scene. I dont know if its a bug or im missing something. Sorry about my english!

nevermind, the problem was on the var script, i removed it and used just the entire function
gameobjectfind… Thanks!