I have been trying to update our spawn system for about 1 year now but to no avail.
I am trying to make it so when you spawn a vehicle from the list if you spawned one before it despawns and spawns the new one.
Currently to get somewhat close to this and prevent spawn spam our system updates a value when you click on a vehicle and the value doesnt reset until you rejoin, basically needing to rejoin each time you want to spawn something new. (it also does not delete the old vehicle)
Any ideas on how i could do it?
vehicles are taken from server storage.
current scripts used:
Insert a value into the spawned vehicle as it spawns that has its name set to the players. Then put it into a folder in the workspace, next when the player requests a vehicle spawn search the folder and delete any vehicles containing a value with the players name.