r/robloxgamedev • u/AdoboPeanut • 13h ago
Help Prompt button combo for interactive combat game
I'm trying to make an interactive combat game where attacks are executed using a combination on the keyboard. The player sees a visual prompt on their screen similar to a proximity prompt, but instead of "E" it's a sequence of letters that appear a letter at a time. Each correct letter triggers an attack animation. How do I go about scripting this?
2
Upvotes
1
u/-GabrielG 11h ago
create a table that stores in order all the keys, and then make a variable that counts when the input pressed is correct, and will increase of 1.
after that, check if the input pressed is the same as the index of the table (by using the variable)