The animation value is not nil and it should work and it has no errors, for some reason it does not play!
QAPcore.Animations.Inside.ScrollingFrame.DescendantAdded:Connect(function(object)
for i,v in pairs(QAPcore.Animations.Inside.ScrollingFrame:GetChildren()) do
if v.ClassName == "ImageButton" then
local tmp = QAPcore.Animations.Inside.ScrollingFrame.Template
v.MouseButton1Click:Connect(function()
local anim = v.Main.AnimationID
local preview = QAPcore.Preview.Main.ViewportFrame
game.Workspace:WaitForChild("Char").Humanoid.Animator:Destroy()
local newanimator = Instance.new("Animator")
newanimator.Parent = game.Workspace:WaitForChild("Char").Humanoid
local animplay = game.Workspace:WaitForChild("Char").Humanoid.Animator:LoadAnimation(anim)
animplay.Priority = Enum.AnimationPriority.Action
animplay:Play()
animplay.Looped = true
end)
end
end
end)
You need to actually create an animation object and set the AnimationId of the animation object to the id. Then you can load the animation object like so:
local a = Instance.new(“Animation”)
a.AnimationId = your_animation_id
hum:LoadAnimation(a):Play()
I assume he’s attempting to read the “AnimationId”* (not “AnimationID”) property of Animation. It is best to load the existing Animation instance over creating a copy.
try to change the animator variable to local newanimator = Instance.new("Animator", Char.Humanoid) or Char.Humanoid.Animator
and remove the newanimator.Parent line
the new animator works fine its just that it never playes the animations and I can still see that the animator is still there b ecause there are no errors and it detects when a animation is nil
then check your animation id, and make sure the publisher is you, (if this is a team create without a group make sure the publisher is the owner of the game, and if it is in a group then make sure the animation is published under the group)
no animations work, i have tried multiple animations. It seems like its trying to play them because the rig in workspace is unmovable in the animation editor after