So in this video of Alvin Blocks where he makes a car Shop gui (https://www.youtube.com/watch?v=zM6QhIn_JBY) But you can spawn multiple cars when you've bought it.
I have a script that should remove the old car after new one is spawned but i cant get it to work. Am i doing something wrong or i need to put the script somewhere else?
local theOldCar=workspace:FindFirstChild('CarName') if theOldCar~=nil then theOldCar:Destroy()?
If you handle this well - then theOldCar
variable should never be nil - you really shouldn't need to run that check. Aside from that - nothing here should be incorrect. If it is not working - I would prioritize checking the location of theOldCar
, and be sure you're searching in the right spot.