Am tryna detect if the player Has clicked the Jump button 2 times With the UserInputService
local UIS = game:GetService("UserInputService")
local LastPress = 0
UIS.InputBegan:Connect(function(input,isTyping)
if isTyping then return
elseif input.KeyCode == Enum.KeyCode.Space then
local CurrentTime = tick()
if CurrentTime - LastPress <= 0.5 then
print("Double Clicked")
end
end
end)
but the issue with this is, it doesnt work on mobile as it doesnt print if i tapped the “JUMP” button screen
is there any other way to detect?? (not looking for Humanoid.StateChanged solution)
Depends if you want to check if the player’s character jumped twice or if they attempted to jump twice, I wasn’t sure as the thread’s prompt is ambiguous.