Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Lighting Ambient Script won't work?

lighting = game.Workspace.Lighting
function c()
lighting.Ambient = Color3.new(31/255,31/255,31/255)
script.Parent.Visible = false
end
script.Parent.MouseButton1Down:connect(c)

I've looked it over and it seems fine to me, but it does not work. No errors either.

1 answer

✓ Accepted answer
lighting = game.Lighting
function c()
lighting.Ambient = Color3.new(31/255,31/255,31/255)
script.Parent.Visible = false
end
script.Parent.MouseButton1Down:connect(c)

1 comment

0

"Lighting" is a service, so it should be referenced by "game.Lighting" (it's not a child of the Workspace)

This discussion is preserved as it was. New answers, comments, and votes are closed.