Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Chatting Animations?

Asked by
JJ_B 250 Moderation Voter
6 years ago

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

Log in to vote
8
Answered by
Shawnyg 4241 Trusted Badge of Merit Snack Break Moderation Voter Administrator Community Moderator Super Administrator
6 years ago
-- 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!

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

Answer this question