Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Chatting Animations?

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?

1 answer

✓ Accepted answer
-- 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!

4 comments

0

Thanks for answering all my questions :3

0

No problem Wizardel! I just like to help people out. Send me a Friend Request on ROBLOX and on here!

1

You also forgot to close the PlayerAdded event.

0

Ah, yes. Let me add that

This discussion is preserved as it was. New answers, comments, and votes are closed.