Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

What's wrong with line 18?

Asked by 10 years ago

local respawnCarsBlock = Game.Workspace.RespawnCarsBlock

function respawnCars() print("I am going to respawn the cars now.")

for _, object in pairs(game.ServerStorage:GetChildren()) do
    print(object.Name)
    if object.Name == "Car" then
        print("This is a car! We need to destory it!")
        object:Destroy()
    end
end

for _, object in pairs(game.ServerStorage:GetChildren()) do
    local carCopy = object:Clone()
    carCopy.Parent = Game.Workspace
    carCopy: MakeJoints()
end 

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

0
What exactly is your Output saying? adark 5487 — 10y
0
Is there a space in the name "PointLight local"? If so, you should either rename it to something without spaces or use the :FindFirstChild() method. GoldenPhysics 474 — 10y
0
it isnt in code format, line 18 NinjoOnline 1146 — 10y

Answer this question