local player = game.Players.LocalPlayer
local hum = workspace:WaitForChild(player.Name):WaitForChild("Humanoid")
UIS = game:GetService('UserInputService')
bool = false
local animation = Instance.new("Animation")
animation.AnimationId = "http//roblox.com/asset/?id=1005558412"
local animTrack = hum:LoadAnimation(animation)
local function onkeypress(input, gpe)
if input.KeyCode == Enum.KeyCode.V then
if bool == false then
animTrack:Play()--How long until animation plays.
bool = false
end
elseif bool == false then
animTrack:Stop()
bool = true
end
end
game:GetService("UserInputService").InputBegan:Connect(onkeypress)
COMMUNITY QUESTION
Can you help me on an Animation Tool when you press V?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
for when the animation stops, the event is UIS.InputEnded
ok sorry i fixed code why is it not working now