Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Chatting Animations?

Asked by
JJ_B 250 Moderation Voter
11 years ago

This doesn't work, but it doesn't look right anyway.

1game.Players.PlayerAdded:connect(function(player)
2  player.Chatted:connect(function(msg)
3    if msg == "/e flap" then
4local animTrack = Humanoid:LoadAnimation(animation)
5animTrack:Play()
6end

How would I do it properly?

1 answer

Log in to vote
8
Answered by
Shawnyg 4330 Trusted Badge of Merit Snack Break Moderation Voter Community Moderator
11 years ago
01-- Import animation
02local animation = Instance.new("Animation")
03animation.AnimationId = "http://www.roblox.com/Asset?ID="
04 
05game.Players.PlayerAdded:connect(function(player)
06  player.Chatted:connect(function(msg)
07local msg = msg:lower()
08    if msg == "/e flap" then
09local animTrack = player.Character.Humanoid:LoadAnimation(animation)
10animTrack:Play()
11end
12end)

You forgot to define the animation variable.

-Thank me by accepting this answer/bumping up my reputation!

0
Thanks for answering all my questions :3 JJ_B 250 — 11y
0
No problem Wizardel! I just like to help people out. Send me a Friend Request on ROBLOX and on here! Shawnyg 4330 — 11y
1
You also forgot to close the PlayerAdded event. TheGuyWithAShortName 673 — 11y
0
Ah, yes. Let me add that Shawnyg 4330 — 11y
Ad

Answer this question