Advertisement
Hasli4

RBLX. DeleteCar

May 15th, 2025
423
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.68 KB | None | 0 0
  1. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  2. local DeleteCarEvent = ReplicatedStorage:WaitForChild("DeleteCar")
  3. local player = game.Players.LocalPlayer
  4.  
  5. game.Workspace.ChildAdded:Connect(function(Added)
  6.     if Added.Name == player.Name .. 'sCar' then
  7.         script.Parent.Visible = true
  8.     end
  9. end)
  10. script.Parent.MouseButton1Down:Connect(function()
  11.     local Car = game.Workspace:FindFirstChild(player.Name .. 'sCar')
  12.     if Car then
  13.         script.Parent.Visible = false
  14.         if player.Character.Humanoid.SeatPart ~= nil and player.Character.Humanoid.SeatPart:IsA("VehicleSeat") then
  15.             player.Character.Humanoid.Sit = false
  16.         end
  17.         wait()
  18.         DeleteCarEvent:FireServer(Car)
  19.     end
  20. end)
  21.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement