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
Alright so i'm not sure what i did exactly but i remade my car and rewrote my car script and it works now? i have no idea why but thank you everyone for trying to help me fix this bug :)