Hi, I’m a noob at scripting and I just ran into a problem. I’m trying to access a function from another script and add 1000 to it when I touch a coin. The error I’m getting is “Assets/scripts/Coin.cs(10,36): error CS1656: Cannot assign to Score' because it is a
method group”. What can I do to fix this?
Here is the script:
using UnityEngine;
using System.Collections;
public class Coin : MonoBehaviour {
void OnCollisionEnter2D(Collision2D col){
if(col.gameObject.tag == ("Player")){
Leaderboard.LDRBRD.Score += 1000;
Destroy(gameObject);
}
}
}
Thanks in advance!