If there is no Drive Seat model inside workspace.Sportcar, I would like to have the vehicle respawn.
How can I fix it?
function cardestroy()
if workspace.Sportcar.DriveSeat == false then
wait(3)
carspawn()
end
end
If there is no Drive Seat model inside workspace.Sportcar, I would like to have the vehicle respawn.
How can I fix it?
function cardestroy()
if workspace.Sportcar.DriveSeat == false then
wait(3)
carspawn()
end
end
You can use FindFirstChild() to detect if an instance exists or not:
function cardestroy()
if not workspace.Sportcar:FindFirstChild("DriveSeat") then
wait(3)
carspawn()
end
end
It needed some modification, but it works fine Thank you.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.