I've been trying to do this for quite a while now and still haven't figured out why it doesn't work!
I'm trying to set the String Value.value to nothing but it always gives me this in the output: 36: bad argument #3 to 'Value' (string expected, got nil)
Here's the script: (Line 10)
seat.ChildRemoved:connect(function(child2)
if child2:IsA"Weld" and child2.Name == "SeatWeld" then
game.Players[driver.Value].PlayerGui.VehicleUi:Destroy()
if seat.Lights.Park == true then
seat.MaxSpeed = 0
seat.Lights.Park.Player = driver.Value
vehicle.Parent = game.Players[driver.Value].Character
else
if seat.Lights.Park.Value == false then
seat.Lights.Park.Player.Value = nil
vehicle.Parent = game.Workspace
for i = 40,0,-1 do
wait(1)
seat.Parent.CountDown.Number.Value = i
if i == 0 then
vehicle:Destroy()
end
end
end
end
end
end)

1 comment
Just set the string value to an empty string: "". You can't set a string value to nil, it has to be a string type. Most value objects are like that, you need to pick a value to represent "nil" in your code.