This script is suppoed to set the brightness and clocktime to 3 when a textbutton is pressed.
script.Parent.MouseButton1Click:Connect(function()
game.Lighting.Brightness = 3
game.Lighting.Clocktime = 12
end)
This script is suppoed to set the brightness and clocktime to 3 when a textbutton is pressed.
script.Parent.MouseButton1Click:Connect(function()
game.Lighting.Brightness = 3
game.Lighting.Clocktime = 12
end)
Nice. Does it work?
If not, try checking the output to see if there are any errors
ClockTime not Clocktime
30 chars
Strange, it’s capitalized in my script, idk why it’s not in the post. Still not working tho
Is this in a Local Script or a Script?
Is this in the workspace or the Players GUI?
Do you get any errors in the output?
Use this inside a local script.
local button = script.Parent
button.MouseButton1Down:Connect(function()
game.Lighting.Brightness = 3
game.Lighting.ClockTime = 12
end)
Use mousebutton1down instead, see if that changes anything
Edit: Are you trying to do this server wide or just local?
For all players, sorry for the late reply.
Server script. Localscripts don’t work in workspace
I ran this script under a TextButton in a part, and it worked just fine.
Are you getting any errors?
For some strange reason, the script was missing 2 and 3 on the lines, and once I pasted it back in it had the lines and worked fine.
If you want it to change for all players, use remote events or remote functions to change it securely and serverwide.
Edit: You don’t have to use the remote events or functions, personally, I find it easier to use. Just change the local script to a regular script and you’re good.