What's wrong with line 18?
local respawnCarsBlock = Game.Workspace.RespawnCarsBlock
function respawnCars()
print("I am going to respawn the cars now.")
01 | for _, object in pairs (game.ServerStorage:GetChildren()) do |
03 | if object.Name = = "Car" then |
04 | print ( "This is a car! We need to destory it!" ) |
09 | for _, object in pairs (game.ServerStorage:GetChildren()) do |
10 | local carCopy = object:Clone() |
11 | carCopy.Parent = Game.Workspace |
end
respawnCarsBlock.Touched:connect(respawnCars)
local redLight = Game.Workspace.StartLight.RedModel.LightBulb.PointLight
local yellowLight = Game.Workspace.StartLight.YellowModel.LightBulb.PointLight
local greenLight = Game.Workspace.StartLight.GreenModel.LightBulb.PointLight
local startBarrier = Game.Workspace.StartBarrier
wait(5)
redLight.Enabled = true
wait(1)
redLight.Enabled = false
yellowLight.Enabled = true
wait(1)
yellowLight.Enabled = false
greenLight.Enabled = true
startBarrier.Transparency = 1
startBarrier.CanCollide = false
The top of this line ^^^ is the script
It said on my output that there is something wrong with line 18 and I don't see whats wrong with it!
Please reply if you know