game:GetService("UserInputService").InputBegan:connect(function(Key)
if Key.KeyCode == Enum.KeyCode.H then
local char = game.Players.LocalPlayer.Character
local humanoid = char.Humanoid
local id = "http://www.roblox.com/asset?id=294995580"
local ani = Instance.new("Animation")
ani.AnimationId = id
humanoid:LoadAnimation(ani)
end
end)
✓ ANSWER ACCEPTED
How Would i be able to Play an Animation?
1 answer
✓ Accepted answer
game:GetService("UserInputService").InputBegan:connect(function(Key)
if Key.KeyCode == Enum.KeyCode.H then
local char = game.Players.LocalPlayer.Character
local humanoid = char.Humanoid
local id = "http://www.roblox.com/asset?id=294995580"
local ani = Instance.new("Animation")
ani.AnimationId = id
local loadAnimation = humanoid:LoadAnimation(ani)
loadAnimation:Play()
end
end)
Try this.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Thx Bro