Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Question about if then statements?

Can I have an if that tests for a local value (dhour), and then if it's true have a then that runs an if statement to test for a seperate value so they must both be true?

This is what I have if dhour == 7 then if dmin == 30 then script.Rise.Playing = true end end

1 answer

Well, assuming you have 2 separate values with one being the hour and the other being min, you can do that.

There’s another way that I’d prefer though if your first conditional statement only moves onto the next conditional statement and doesn’t do anything else. You can use “and”.

Here’s an example :

if dhour == 7 and dmin == 30 then
script.Rise.Playing == true
end

Hope this helped!

This discussion is preserved as it was. New answers, comments, and votes are closed.