I'm a 1-2/10 scripter so I'm still trying to learn but I'm stuck on this, I looked around and couldn't find anything that helpful.
enabled = true
script.Parent.TextButton.MouseButton1Click:connect(function()
if enabled then -- NIGHT TIME
game.Lighting.TimeOfDay = "20:00:00"
game.Lighting.OutdoorAmbient = Color3.new(0.395,0.395,0.395)
game.Lighting.Brightness = 0.5
game.Lighting.FogColor = Color3.new(0.0395,0.0395,0.120)
game.Lighting.FogEnd = 1000
enabled = false
else -- DAY TIME
game.Lighting.TimeOfDay = "15:00:00"
game.Lighting.OutdoorAmbient = Color3.new(0.5,0.5,0.5)
game.Lighting.Brightness = 1
game.Lighting.FogColor = Color3.new(0.749,0.749,0.749)
game.Lighting.FogEnd = 2500
enabled = true
end
end
I want the SurfaceGUI Textbutton to be clicked to change the day. It works if I use a regular block but I want it on a SurfaceGUI and i'm having trouble. Can anyone help fix this? Really helpful if anyone could clarify this for me!
