Help, I notice that when I use ContextActionService to get input, they trigger twice... uh..
Let's say:
local con = game:GetService("ContextActionService")
function hi()
print("OMG! HI!")
end
con:BindActionToInputTypes("Hi", hi, true, Enum.KeyCode.R)
When I press r, it prints "OMG! HI!" but when I released, it prints too. So, what should I do so that the function can be run when the key is pressed ONLY!

2 comments
Use the KeyDown function and add a debounce. Look those 2 up in the wiki.
But I need to make it works on mobile too, I use debounce but still, the function runs twice.