I know how it would be for as long as you keep a key pressed to execute an action but I do not know how it would do so that when you finish holding down a key for Z seconds. Help me
Example of what I did : local uis = game:GetService("UserInputService")
uis.InputBegan:Connect(function(input,obj)
local key = input.KeyCode
if key == Enum.KeyCode.E and not obj then
script.Parent.Frame:TweenSize(UDim2.new(0, 546,0, 43),"InOut","Linear",8,true)
script.Parent.Frame.Visible = true
script.Parent.Frame2.Visible = true
end
end)

3 comments
Edited for title translation. Google translate used.
Sorry but i dont speak inglish very good
while not uis.InputEnded do