I need help for this script, It doesnt let me delete the car if i already sat on the driveseat.
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 = "Mobil Dihapus" wait(2) B.Text = "Hapus Mobil" else game.Workspace[player.."Car"]:Destroy() B.Text = "Tidak Ada Mobil" wait(2) B.Text = "Hapus Mobil" end end)

3 comments
Can you write it in a codeblock? It's kinda messy
If this is a normal script then it won't work. If it's a localscript then it won't destroy anything.
connect is deprecated, consider using Connect.