Hey so I am trying to make a progress bar like madcity when you interact with something (e.g. picking up money with E key)
All I know is how to hold down the E and not how to animate per press.
Script so far:
local uis = game:GetService("UserInputService")
local runService = game:GetService("RunService")
local frameGui = script.Parent.KeyblindE.Frame
local pressed = false
uis.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
pressed = true
end
end
uis.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.E then
pressed = false
end
end
runService.Stepped:Connect (function()
if pressed then
-- make gui scale
else
-- on release, set back to 0
end
end