Hi. I'm making a car spawn script, It works perfectly. However, I want it to remove the old spawned car when you spawn a new one. Is there any way to do this locally, and without having to call them directly? Here's the script.
function onClick() local ae = game.Lighting.bmww local name = game.Players.LocalPlayer.Name local char = game.Workspace:FindFirstChild(name) local b = game.Lighting.bmww:Clone() b.Parent = game.Workspace b:MoveTo(char.Torso.Position + Vector3.new(0, 2, 10)) b:MakeJoints() -- line removing old one game.Workspace.cadi:remove() end script.Parent.MouseButton1Click:connect(onClick)