I am fairly certain that I’v used the tenary operator many times in roblox. Ex: humanoid.JumpPower = (humanoid.Sit) ? 0 : 50
That was just an example of what the ternary is, I never actually ran THAT particular code.
But has this been removed recently? I keep getting errors when using it.
That is Java/C/etc – not Lua. Lua’s ternary is just: JumpPower = humanoid.Sit and 0 or 50
Also, FYI languages don’t have stuff like this removed arbitrarily, so the answer to your question was pretty apparent. You could have Googled “Lua ternary operator” to make sure you were doing it right before assuming it was removed.
Nobody would remove ternary capabilities from Lua, thats just common sense. (For a programmer)
The ternary operators you described has never existed in Lua let alone Lua 5.1 that ROBLOX uses. You’ve never used them in Lua. At all. It would of had to been in another language.
Lua is different in that a lot of others languages will have && and || as their and/or for things like if statements and ternarys having dedicated operators like ?/: while Lua just uses and/or for both.