#Check time between Input.Began and Input.Ended
3 messages · Page 1 of 1 (latest)
You could make a varible outside of the functions, then in input began set it to tick(), then in input ended the time difference will be tick() - that varible
local lastTime = tick()
game:GetService("UserInputService").InputBegan:Connect(function(key)
lastTime = tick()
end)
game:GetService("UserInputService").InputEnded:Connect(function(key)
print(tick()-lastTime)
end)```