Can anyone here explain why this won't work? I'm making a script that changes the time of day when clicked.
Button1 = script.Parent function onClicked(Button1) script.Parent.Parent.Lighting.TimeOfDay = 17 end script.Parent.ClickDetector.MouseClick:connect(onClicked)
You can't change the time of day to 17
, it goes in 00:00:00
format. So your script should be written like this :
local Button1 = script.Parent function onClicked(Button1) game.Lighting.TimeOfDay = "17:00:00" -- 00:00:00 format end script.Parent.ClickDetector.MouseClick:Connect(onClicked)
If you have any other questions, please let me know
--oSy