In the Workspace I have an Animation called "Anime". When a GUI TextButton is clicked, I want an animation to load into the Humanoid of a model. But when I click the button, I'm just presented with the error "Humanoid is not a valid member of Player".
script.Parent.MouseButton1Click:connect(function() Anim = script.Parent.Parent.Parent.Parent.Humanoid:LoadAnimation(Anime) end)
Now I am sure that I have the correct number of .Parent
's to get me to the Player's character (this script is a far descendant in the Character). So what am I doing wrong?
(P.S. this is my first ever time using Animations so sorry this is such a nooby question)
Do this with a local script
script.Parent.MouseButton1Click:connect(function() local Anime = workspace.Anime Anim = game.Players.LocalPlayer.Character.Humanoid:LoadAnimation(Anime) Anim:Play() end)
you need to play the animation in order for you to actually preform it.
Tell me if that works.