✓ Accepted answer
or is an operator; to be more specific, it is a logical operator. Before I explain to you the specifics, keep in mind that, like control structures, logical operators treat false and nil as falsey and anything else as truthy. Here are all the logical operators:
exp1 or exp2 evaluates to exp1 if it is truthy; otherwise, it evaluates to exp2.
exp1 and exp2 evaluates to exp1 if it is falsey; otherwise, it evaluates to exp2.
not exp evaluates to true if exp is falsey or false if exp is truthy.
With this in mind, consider the following code:
print(nil or "hello")
print(false or nil)
print(true or false)
print(nil and "hello")
print("hello" and false)
print(true and false)
print(not true)
print(not nil)
print(not 123)
Regarding your code and question, "Hello" or nil would indeed evaluate to "Hello". "Hello" or true would also evaluate to "Hello".
2 comments
It's basically an alternate operator , if something doesn't equal to this, or if unavailable, or, if alternate defined, will pass the alternate as a second option
Example: local character = player.Character or player.CharacterAdded:wait() if 'player' doesn't exist, it'll use the alternate method provided, which was to wait for the CharacterAdded event, instead of setting the variable to nil