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!
The third parameter in contextActionService, if set to true, will also call upon the function provided.
local con = game:GetService("ContextActionService") function hi() print("OMG! HI!") end con:BindActionToInputTypes("Hi", hi, false, Enum.KeyCode.R)
The above should fix your problem.