Can you give a button a TAG?

im new to unity and im making quiz game, instead using a string and questions i used Object, Prefabs. i have a controller with several buttons. I am instantiate the game object to display and right button is pressed destroys object. but im stuck on removing the current game object. i tried giving each of the game objects with a tag when Button is cliicked but all my game object with the same tag are destroy from my lists.

code ive been rewriting and this is about what i have,

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Buttons : MonoBehaviour {
Button 1,2,3,4,5,6;
public float timesleft;
int scoreincrease;
bool isOver;

public void button1_Clicked ()
{
if
(GameObject.tag(“Text”)){
{ GameObject.SetActive(true); //Set object off then to display a new instantiate obj,
scoreincrease ++1;
}
else
{ isOver();
EndGame.
}

Please use code tags when you post code on the forums – look here for how to do so: Using code tags properly - Unity Engine - Unity Discussions

That code looks wrong. It shouldn’t even be compiling, I would think.

Is your question, if the answer button is pressed destroy the game object?
– Is the game object holding the questions and answers, just curious?

Have you gone through some tutorials from Unity? Learn
That would be the best place to begin! :slight_smile: