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

Animation (again)

Asked by
JJ_B 250 Moderation Voter
10 years ago

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)
0
Anyone? ._. JJ_B 250 — 10y

1 answer

Log in to vote
1
Answered by
User#2 0
10 years ago

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

0
How would I do that within the script though? JJ_B 250 — 10y
Ad

Answer this question