Is there a way to include an event, such as .Changed and connect it to a function. This is what I have so far, why doesn't it work?
local function Light()
while script.Parent.Parent.Parent.Danger.Value==true do
for i=0,180,1 do
script.Parent.Orientation = Vector3.new(0,i,0)
wait(0.01)
end
end
end
script.Parent.Parent.Parent.Danger.Changed:connect(Light())

1 comment
you put "(Light())". You're soppose to call the function by putting its name. You dont have to put the () after light or it wont work.