/example
if game.Lighting.TimeOfDay = "05:35:00"
then
end
this script is not finished, however, I need to know if having "=" would make it not work, because in the Script Analysis, it says it does not need = to function properly?
/example
if game.Lighting.TimeOfDay = "05:35:00"
then
end
this script is not finished, however, I need to know if having "=" would make it not work, because in the Script Analysis, it says it does not need = to function properly?
You can not change something within a if statement the section between 'if' and 'then' is used to check if it is true or false. Your example is attempting to change the value of TimeOfDay which will error, you'd have to use '==', which will return true in this case (which is either true or false making the if statement happy (happy? lol)) to check if it equal to it for not.
if game.Lighting.TimeOfDay == "05:35:00"
then
end
thanks
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
No, it says "Expected 'then', got '='".
I'm asking if it would require = to function, not for the expected then.
put the then on line 1