This doesn't work, but it doesn't look right anyway.
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "/e flap" then local animTrack = Humanoid:LoadAnimation(animation) animTrack:Play() end
How would I do it properly?
-- Import animation local animation = Instance.new("Animation") animation.AnimationId = "http://www.roblox.com/Asset?ID=" game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) local msg = msg:lower() if msg == "/e flap" then local animTrack = player.Character.Humanoid:LoadAnimation(animation) animTrack:Play() end end)
You forgot to define the animation variable.
-Thank me by accepting this answer/bumping up my reputation!