Advertisement
Anukun_Lucifer

AICarScript(Complete)

Apr 7th, 2023
1,057
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.85 KB | Gaming | 0 0
  1. local seat = script.Parent.Seat
  2.  
  3. local checkpart = script.Parent.CheckPart
  4. local stoppart = script.Parent.RedPart
  5. local gopart = script.Parent.GreenPart
  6.  
  7. gopart.Position = Vector3.new(-183.9, -13.4, 38)
  8. stoppart.Position = Vector3.new(-183.9, -13.4, 38)
  9.  
  10. seat.Throttle = 1
  11.  
  12. script.Parent.Body.Touched:Connect(function(hitturn)
  13.     if hitturn.Name == "Turn" then
  14.         seat.Steer = 1.50
  15.         wait(1.5)
  16.         seat.Steer = 0
  17.     end
  18. end)
  19.  
  20. script.Parent.Body.Touched:Connect(function(hitstop)
  21.     if hitstop.Name == "RedPart" then
  22.         seat.Throttle = 0
  23.         stoppart.Position = checkpart.Position
  24.         gopart.Position = Vector3.new(-183.9, -13.4, 38)
  25.     end
  26. end)
  27.  
  28. script.Parent.Body.Touched:Connect(function(hitpass)
  29.     if hitpass.Name == "GreenPart" then
  30.         seat.Throttle = 1
  31.         gopart.Position = checkpart.Position
  32.         stoppart.Position = Vector3.new(-183.9, -13.4, 38)
  33.     end
  34. end)
Tags: Roblox lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement