I was wondering if there's a function like KeyHold, kind of like KeyDown but for when you're holding a key.
Example:
local Player = game.Players.LocalPlayer
Player:GetMouse().KeyHold:connect(function(keydown)
local key = string.lower(keydown)
if key == "c" then
print(math.random(1,9999))
end
end)
When I tried using KeyHold it gave me this error.
KeyHold is not a valid member of PlayerMouse
Any way I can achieve this? Any help appreciated.
Sorry I can't explain any better.

2 comments
Use UserInputService InputBegan to indicate what button is being pressed, then use InputEnded to indicate if that button has been released.
Can you give me a example?