Hello there, I'm new scripter, of course still learning. I am having trouble with this lines, it's really bother, giving me headache.
Locals scripts that will might help you to understand
local lights = {}
local static = true
local dis = false
local area = Workspace.Rig:GetChildren()
for i=1,#area do
table.insert(lights,area[i])
end
V That script I'm having trouble V
function Alarm()
if script.Parent.alarm.Text == "Activate Alarm" then
script.Parent.alarm.Text = "Deactivate Alarm"
for i,v in next, workspace.Rig:GetChildren() do
v.Static.Light.Toggle = true
end
else
script.Parent.alarm.Text = "Activate Alarm"
for i,v in next, workspace.Rig:GetChildren() do
v.Static.Light.Toggle = true
end
end
end
The error was
14:57:57.436 - Static is not a valid member of Model 14:57:57.438 - Script 'Workspace.Model.Screen.SurfaceGui.ImageLabel.Script', Line 266 14:57:57.440 - Stack End
?

8 comments
Static is not a member of every child of Rig
It is.
Yes, as eLuante said, on line 17 and 22, "Static is not a child of Rig". Just what exactly are you trying to do on line 17 and 22 of the above script?
But Static is in Rig; http://prntscr.com/bg0zoe
When you press the "activate alarm" and the emergency spinning light name(Static) and the error reports is appeared.
Try taking out the 'Static' in the script; make it v.Light.Toggle.
Every child of rig is called Static, but Static is not a member of every child of Rig.
^^........ Wtf.