I am making a script that allows you to hold a key to fly up.
local mouse = game.Players:FindFirstChild(script.User.Value):GetMouse()
mouse.KeyDown:connect(function(key)
if key:lower() == "q" then
print("QKeyDown")
end
end)
That is what I have so far, but you have to keep pressing the key to make it print. I want to make it so it continuously prints when you have the key held down. Is there a mouse.KeyHeld:connect method, or a different way of doing it?
