One example: Double jumping. What I'm trying to make is when you press "SPACE" twice, you get thrusted fowards.
p = script.Parent.Parent
repeat wait() until p.Character
c = p.Character
print("HELLO")
mouse = p:GetMouse()
ticknow = nil
tickaft = nil
mouse.KeyDown:connect(
function(key)
key = key:lower()
if key:byte() == 32 and not ticknow then
ticknow = time()
print("HALLO")
elseif key:byte() == 32 and ticknow then
print("HERRO")
tickaft = time()
if tickaft - ticknow < 1 then
print("DOUBLE DUH STOOF")
tickaft = nil
ticknow =nil
end
end
end)
Regardless of what I do, it either prints out the double function or gets stuck on "HERRO"

1 comment
Yes, as you can see, I can do that just fine, but I need to be able to check the time difference between activation.