I’ve just made a score for my game, and I’ve tried to do that when you get to a certain score you’ll get to the next level, I haven’t done the next step code yet but it’s irrelevant at the moment. I’m having a CS0029 error, line 31. Please help me.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class scoreactive : MonoBehaviour
{
public Text MyscoreText;
private int ScoreNum;
public int ScoreTarget;
// Start is called before the first frame update
void Start()
{
ScoreNum = 0;
MyscoreText.text = "" + ScoreNum;
}
private void OnTriggerEnter2D(Collider2D Hexegon)
{
ScoreNum += 1;
MyscoreText.text = "" + ScoreNum;
}
void FixedUpdate()
{
if(MyscoreText.text = ScoreTarget)
{
}
}
}