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

Animation will not load on Rig??

Asked by 5 years ago

I am trying to load an animation into a Rig, but it comes back with the error 'LoadAnimation requires an Animation object'.

The localscript this is in is located at game.StarterGUI.maingui.mainscript (i think this might be the problem??)

The rig is at game.Workspace.swat1 The animation is at game.Workspace.swat1.Humanoid.swot1 OR game.Workspace.swat1.AnimSaves.swot1

Any advice would be helpful, im a bit of a noob too so if it's something obvious, that's my defense.

wait(7)

local animation = game.Workspace.swat1.Humanoid:LoadAnimation(game.Workspace.swat1.Humanoid.swot1)

animation:Play()

warn("Done")

1 answer

Log in to vote
0
Answered by
BielNS 40
5 years ago
Edited 5 years ago

(Edited): You cant load a animation, the Load event is from the Humanoid, Try This:

local anim = --//Put the animation localization here

--//Function
local human = --//Humanoid Localization
local anim = human:LoadAnimation(anim)
0
So.. like this?? local animation = game.Workspace.swatmain.Humanoid.swot:LoadAnimation(animation) TigerManGamingYT 2 — 5y
0
using local animation = game.Workspace.swatmain.Humanoid.swot gives 'LoadAnimation is not a valid member of KeyframeSequence'. TigerManGamingYT 2 — 5y
0
i edited my answer BielNS 40 — 5y
0
no, its like this: game.Workspace.swatmain.Humanoid:LoadAnimation(animation), also if my answer answered u check my answer as a answer to close the thread plz. BielNS 40 — 5y
Ad

Answer this question