Animation not working?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    to play the animation

  2. What is the issue?
    the animation wont play but the output prints the text

  3. What solutions have you tried so far?
    tried republishing the animation twice


while wait(10) do

	anim:Play()
	print("AnimPlaying")	
	wait(3)

end

really not sure why this isnt working, i get the output in studio/play testing but the animation isnt playing

1 Like

Can I see some of the variables you have?

so sorry i forgot to include the top line of the script

do
local ani = script.Parent.HeadAnim
local hum = script.Parent:WaitForChild(“Humanoid”)
local playani = hum:LoadAnimation(ani)

while wait(10) do
playani:Play()
wait(3)
end

That might work, Maybe do a repeat until loop instead of while loop

i added a print statement to show the script is working, but the animation still doesnt play :frowning:

maybe i could try using Vectors instead of animation ?

Maybe. Try a repeat until loop

If im correct, the animation isnt playing, is the game inside a group? if yes then you will have to upload the animation directly in the group

1 Like

the simplest cause is that something in the model is anchored. Assuming that isnt the case then another cause could be that the owner of the game isnt the same as the owner of the animation. If the game is published under a group or an account that isnt the same as the one you used to publish, then the animation wont play. It’s a mechanism roblox has to prevent stealing assets. All you need to do to fix it is publish it under the same account or group.

2 Likes

yeah im having someone on fivver do the animations and he walked me through publishing it through my account since im the game owner

I’ll look to see if anything is anchored

1 Like

so checking the model and nothing is anchored

where is the script parented. show us the explorer hierarchy

New Bitmap Image

i just now went in and created a random animation and that one wont load either :frowning:

can i get a fuller picture of it? i cant really see where its parented, or where its parent is parented, or where the animation is

so sorry for the late reply

Bump. still need help with this :frowning:

try using the animator inside the humanoid. The code is the same but it looks like this …

Humanoid.Animator:LoadAnimation(anim)

also how did you check if everything was unanchored?