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

3 comments

0

What exactly is your Output saying?

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.

0

it isnt in code format, line 18