You know what they say;
public gameObject subscribebutton;
public bool isonbutton;
void OnTriggerEnter2D (coll, Collision2D)
{
| if (Collision2D.gameObject == subscribebutton)
| {
| | isonbutton = true;
| }
}
void start ()
{
| isonbutton = false
}
void update()
{
if (Input.GetKeyDown(KeyCode.Space) && isonbutton == true)
{
| Debug.Log(“you are extremely cool 🆙🆙🆙”);
}
}