I was trying to make 2 buttons which would turn on or off the generators.
But if you know LUA and isn't a beginner, You can see that I pretty much screwed up.
function onClicked(playerWhoClicked) game.Lighting.Ambiet = [0,0,0] end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
There wasn't anything in the Output related to this.
i think this is what you want make a model with 2 parts in them name 1 of them OnPart and the other 1 OffPart and within those parts put a clickdetector in them and also put a script in the model Putting everything up and what you want to write in the code is this
script.Parent.OnPart.ClickDetector.mouseClick:connect(function() game.Lighting.Ambient = Color3.new(255/255,255/255,255/255) end) script.Parent.OffPart.ClickDetector.mouseClick:connect(function() game.Lighting.Ambient = Color3.new(-255/255,-255/255,-255/255) end)
if you did everything i said correctly then you would get this as your result Result