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

Context action service one function housing every action? or one function per action?

Lets say you were to bind 'e', 'f', 'v'

would it be better to have one function, and in that function it checks was 'e', 'f', or 'v' key pressed and if so do a different action

or would it be better to have a unique function for the 'e' key and bind that one the 'f' key and bind that one the 'v' key and bind that one

1 answer

✓ Accepted answer

It'd be better to split them since they already require a different function, otherwise you have to make a large if elseif statement to check for all possible keys.

1 comment

0

Thank you for clarifying! That was what i was assuming, but i just wasn't sure :)

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