****MY big ugly code dont hate ;(
local req = 0
local LCV --Lets make this nill
local deb = false
uis.InputBegan:connect(function(input, GPE)
if GPE then return end
if input.KeyCode == Enum.KeyCode.E then
if not deb then
deb = true
req = 0
LCV = true
local human = char.Humanoid
ani.AnimationId = "http://www.roblox.com/asset?id=387149840"
if human then
local load = human:LoadAnimation(ani)
if load then
load:Play()
end
end
while LCV do
wait(1)
req = req + 1
print 'added 1'
end
end
wait(2)
deb = false
print 'cooled'
end
end)
uis.InputEnded:connect(function(input)--Aftet button was released
if input.KeyCode == Enum.KeyCode.E then
LCV = false
print(req)
ani.AnimationId = "http://www.roblox.com/asset?id=387152305"
local hu = char.Humanoid
if hu then
local load = hu:LoadAnimation(ani)
if load then
load:Play()
wait(2)
load:Stop()
end
end
end
end)

2 comments
isnt very helpful i already know how this works....
So then use the same principle for InputEnded.