I am new to unity and c#. Currently I am going along with brackeys - how to make a video game series. But I am stuck at making the score board. I have copied the same code but don’t know why is it increasing when I am pressing w and s keys. Here is the code
using UnityEngine;
using UnityEngine.UI;
public class SCORE : MonoBehaviour
{
public Transform player;
public Text scoreText;
void Update()
{
scoreText.text = player.position.x.ToString("0");
}
}
Can someone point out the problem.
Thanks