Hi,
I am working on a remake of pong when I was just testing something when I realized when I was running
Destroy(this);
it didn’t do anything
This is the whole script for the gameObject “Ball”
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SocialPlatforms;
public class PauseScript : MonoBehaviour
{
// Use this for initialization
void Start()
{
Destroy(this);
}
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Return))
{
Instantiate(this);
}
}
}