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

Animation (again)

I've finally smoothed out all the errors in my script to find that this still doesn't work! Can anyone help me?

local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/asset/?id=148381514"
 
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)
end)

1 comment

0

Anyone? ._.

1 answer

✓ Accepted answer

The LoadAnimation method takes an Animation object. Try instancing an animation, setting it's properties, then using LoadAnimation on that object.

1 comment

0

How would I do that within the script though?

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