I want to keep the script to be nice and clean, so I want to keep this in one line.
What I’m trying to do is, if “Smooth?” is true, to set _smooth (variable) to Enum.EasingStyle.Sine and If it isn’t, set it to Enum.EasingStyle.Linear.
I’ve tried to do this before, but I always got an error.
Remove the end, Luau’s ternary operator is if condition then true_value else false_value, of course you also have elseifs though you don’t need it in your case
It’s personal preference, if it’s something simple as you’ve shown here, I would personally one line it, though some people would prefer it like that for their own reasons, both solutions give the same outcome so there’s nothing wrong with using one or the other unless it kills readability