I have try to move the object but i can’t get it to work.
I have test it so her.
public bool point = false;
private int points = 0;
public Text Text;
public bool Starts = true;
public GameObject player1;
void Start()
{
player1 = GameObject.Find (“Player”).GetComponent ();
}
void OnTriggerEnter2D (Collider2D other)
{
point = true;
Starts = true;
}
void Update()
{
Text.text = "Points: " + points.ToString();
if (point == true)
{
print (“funkar”);
if (Starts == true)
{
points += 1;
print (points);
point = false;
Starts = false;
player1 = transform.Translate (0, 0, 0);
}
}