Can you skip parameters in functions?

I want to use tweenservice. I want tween to reverse. Reverse paramater is one of the last paramaters in TweenInfo.new(). I want to do something like TweenInfo.new(4,reverses = true) which is what can be done in Python. I don’t want to type every paramater in between with all their enums etc.

Can I skip them?

2 Likes

Unfortunately, you can’t assign a key to a parameter value in Lua. If you want to skip a parameter, you can give it the nil value in most cases and it will result to the default value.

3 Likes

You can’t, a workaround is to set them to a default parameter or most used.

1 Like