how to declare coin get in many scenes play to the a main menu or scene shop?

You still aren’t using code tags on your code, so I can’t help you further. It really is a pain to read code that isn’t formatted. Do you see the difference in what @methos5k posted using tags and what you posted? It’s a lot easier to read…

I hear ya, … I feel like a significant chunk of my posts are the link to code tags on the forums! lol

public Text coinText;
public float coinAdd = 0f;
public float coinCount;
public float TopCount;

void Start ()
{
if (PlayerPrefs.HasKey(“Coin”))
{
CoinCount = PlayerPrefs.GetFloat (“Coin”,CoinCount);
}

}
void Update () {

}

public void AddCoin (int CoinToAdd)
{
coinCount += CoinToAdd;
}
}public void AddCoin (int CoinToAdd){
coinCount += CoinToAdd;
CoinCount = PlayerPrefs.SetFloat (“Coin”,CoinCount);
}
}
coinText.text = " " + Mathf.Round (coinCount);

}

then, how declare load value in this scripts to another script in diffrent scene?

Hey there, click this link and take 1 minute to look at it & read :slight_smile:

Forgetting to use Code tags once is forgivable, twice is irritating but some people need to be told the same thing twice… But at this point you’re just being obnoxious. Stop posting, read how to use code tags (all you do is surround your code with [ code ] [ /code ] tags without the spaces), and then come back.

Watch this