About asign game object in the scripting

I need to asing a certaing game object trought scripting, has anyone any idea of how to do it? i have tried to do from another script, with a static gameobject, but it dosent seems to work and im out of ideas

Perhaps a little showing of your code might help your cause. But ultimately, this sort of this is pretty elementary.

It’s such a common thing to access a variable from one component to another component. It’s no different whether it’s a float, string, gameobject or anything else. There are tons of tutorials out there on how to do it. It’s not even specifically a Unity thing to access variables from one script to another.

You need the script to have a reference to the other script or some way to get that reference, and then with the simple approach being a public variable, you just grab that value from that reference.