I'm currently in the conceptual stages of an extreme sports type game, much like the game SHRED. In that game, different motions, such as grabs, tweaks, or body varials, are binded to different keys along with a direction.
(EX: Shift + Right = Melon Grab)
I want to be able to detect if the player were pressing a certain button and a direction to create specific combinations.
Additionally
How can I make it to where a player is in a "custom state", like I can set a variable in the player that isn't given from the roblox engine, I want to be able to set the player to be hypothetically "inTrick" state to detect whether a trick was landed or not.
Thank you for reading my question, I'm really excited to learn and go through the process of game development.
Probably not the most in-depth explanation, but whatever.
For this, I'd suggest UserInputService which can access what buttons the player is pressing.
You'd first want to import it.
local UIS = game:GetService("UserInputService")
Then when you detect a new input, you want to check for combinations of keys pressed (for this I'll be using the one you mentioned but you can replace the Enum.KeyCode. with whatever keys you like.
UIS.InputBegan:Connect(function() if UIS:IsKeyDown(Enum.KeyCode.LeftShift) and UIS:IsKeyDown(Enum.KeyCode.Right) then doMove() --replace this with the function which performs the move (eg. melon grab) end end
Hope I covered everything, feel free to ask any questions. I haven't tested this and I can notice some possible problems that may arise but I'll leave that to you. Good luck. :)