I'm setting a function that turns off a light and I get an error. Why?
I'm referencing a video. And I'm doing pretty much everything it's telling me to do. The video is about how to make a stoplight.
03 | local stoplight = script.Parent |
04 | local red = stoplight.Red |
05 | local yellow = stoplight.Yellow |
06 | local green = stoplight.Green |
09 | local function on(part) |
10 | part.Material = Enum.Material.Plastic |
11 | part.SurfaceLight.Enabled = true |
15 | local function off(part) |
16 | part.Material = Enum.Material. |
17 | part.SurfaceLight.Enabled = false < |
I'm just putting an equal sign and there's an error in it. If I run it, I get this error.
12:50:20.944 - Workspace.StopLight.Light Controller:17: Expected identifier when parsing expression, got '='
Why does this happen and how do I fix this? This is literally correct. How is this even deemed incorrect?