self explanatory, in my game i have an input event’s keybind set to E and it gets pretty annoying having code run a bunch of times because of this
1 Like
this is actually simple, the second parameter of the UserInputService function is to prevent that
example:
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if not gameProcessed then return end
if input.UserInputType == Enum.UserInputType.Keyboard then
print("whatever")
end
end)
3 Likes
If you’re using InputBegan or InputEnded, it has a 2nd return called GameProcessedEvent
, just check if it’s true
@Afraid4Life said it before me haha
2 Likes