I ran into an issue where :BindAction() stops the key that was used from activating InputBegan. Is there any way around this or something else I could use? Thanks :3
You have a script we can see …
Sorry about that :<
I have this in one script
ContextActionService:BindAction("Jump", doJump, true, Enum.KeyCode.Space)
Then just testing in another
game.UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.Space then
print("Space pressed")
end
end)
I may be wrong since I’m not an expert on user input service, but if I have understood correctly the documentation “gameProcessed” will be true when the key is pressed, and when it’s true your function returns, stopping the exectution of the function, so input began probably still works, it’s just that your function doesn’t run enough to reach the print (I probably wrote it really bad so if you don’t understand I’ll happily rephrase it)
This worked! I need to look into what gameprocessed is used for. Thanks :3
Add one for InputEnded to match InputBegan
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.