When a player presses a button on a GUI it fires a remote event and the server script picks it up and launches this code, But when it spawns into the workspace it disappears after a second.
local remote = game.ReplicatedStorage.SpawnCar
local function SpawnCar()
game.ReplicatedStorage:WaitForChild("Car"):Clone().Parent = game.Workspace
end
remote.OnServerEvent:Connect(function(player)
print("received")
SpawnCar()
end)
I found out the when the parts of the car is grouped and I clone that it does not disappear but I need the parent to be a part so I can CFrame the car to the player when it spawns in

11 comments
can the car fall into the void and destroy itself? try using :SetPrimaryPartCFrame to move the car into position from which it won't fall
that's not it because the car falls onto the baseplate and I can drive it for a second and then it deletes it self. Thanks for the suggestion though
it can be because a dfiferent script is removing the car, check for :Destroy in other scripts
Is there a script inside the car which is destroying the car?
I just checked I did not put a :Destory() into the car accidentally
or anywhere else
if you drop me .rbxl file of the place on discord i'll save your butt nob :)
i'm not doing that i have too much work in this game and i'm not going to trust you
ok, try Ctrl + Shift + F in studio to search all and search for :Destroy or Debris:AddItem, both of these can remove your car
the is none that have to do with the car getting deleted
Are you moving an invisible part whose child is a car model? Or it's a part of a car model? Anyways, try using Model:SetPrimaryPartCFrame(CFrame)