I have a script that is supposed to make a bunch of cylinder parts change their material, enable their lights, and then reset their material and turn those lights off, one light at a time, 24 times.
But, when I run my script, I get Workspace.Big Bass Wheel.BobberAssembly.LightChaserScript:5: attempt to call a number value
Here is my script:
--Light Chasing Animation
--by Yellowboy111
lightFolder = script.Parent.Lights
while true do
for i in 1, 24 do
lightFolder[tostring(i)].Material = Enum.Material.Neon
lightFolder[tostring(i)].PointLight.Enabled = true
wait(0.1)
lightFolder[tostring(i)].Material = Enum.Material.Plastic
lightFolder[tostring(i)].PointLight.Enabled = false
wait(0.1)
end
wait(0.1)
end

1 comment
Never mind, in line 5 I had
for i in 1, 24 do, but in reality I needed the line to sayfor i = 1, 24 do, my bad.