Does anyone know how to fix this? It would be very much appreciated.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InfiniteCar : MonoBehaviour
{
public GameObject car;
void Start()
{
InvokeRepeating("Inst", 1f, 1f);
}
void Update()
{
void Inst()
{
{
Instantiate(car, transform.position, transform.rotation);
}
}
}
}