Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you fix a car deleting script from a car spawner?

Asked by 3 years ago

So the problem is, It deletes the car when you havent sat in the DriveSeat yet, But when you drive the car and get off the car it doesnt delete.

Script: local P = script.Parent local player = script.Parent.Parent.Parent.Name--P.Parent.Parent local B = P.B B.MouseButton1Click:connect(function() if game.Workspace:FindFirstChild(player.."Car") then game.Workspace[player.."Car"]:Destroy() B.Text = "Car Deleted" wait(2) B.Text = "Delete Car" else game.Workspace[player.."Car"]:Destroy() B.Text = "No car found!" wait(2) B.Text = "Delete Car" end end)

Answer this question