Alright, so this is my script where whenever you jump out of a car (Active = false) then it begins to countdown from 30. The "until" part keeps saying "attempt to index field 'Parent' (a nil value)" when the car (script.Parent) gets destroyed.
script.Parent.VehicleSeat.Active.Changed:connect(function()
if script.Parent.VehicleSeat.Active.Value == false then
repeat
wait(1)
script.Parent.Number.Value = script.Parent.Number.Value - 1
script.Parent.Base.Countdown.Number.Text = script.Parent.Number.Value
if script.Parent:FindFirstChild("VehicleSeat") == nil then
script.Parent:Destroy()
elseif script.Parent:FindFirstChild("Number") and script.Parent.Number.Value < 1 then
script.Parent:Destroy()
end
until script.Parent.VehicleSeat.Active.Value == true or script.Parent.VehicleSeat == nil
end
end)
This happens because once the car is removed, the parent is no longer available. But how do I make the repeat statement stop so I don't get any errors?

2 comments
Then why won't you remove the Destroy() function and try to use another method? Because, I'll be honest, for me, the question was a bit confused, and therefor, I didn't understand it, so, what I'm asking is, can you be a bit more specific?
scripts that call Destroy() on themselves or their Parent object also tend to be problematic more often than not.