Hello I’m working on a demo for a platformer and im having a problem im trying to have my object which is named Data act as a point as in score system so when my player walks over it or collides it adds a point i have the collision done its just how would i add the point would it be a if statement if so were would i put it theres no need for update or start as i only have
void OnTriggerEnter(Collider other)
{
Destroy(this.gameObject);
}
Where should i put the if statement ? thank you Its c# btw