Animation not looping

I want to make it so that a character on my main menu screen will play an animation.

I made it looped on the script but the character just does the animation once and returns to a “Dummy” pose.

I’ve tried to look at the animation if I’ve set the duration for too long but that doesn’t seem to be the case.

This is the script: (Plus, the script is the animation’s parent)

local animation = script:WaitForChild('Dance')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
dance:play()
dance.Looped = true

You have to put .Looped before :Play()

I made it so that the .Looped and :Play swapped places but the animation still doesn’t loop.

Script:

local animation = script:WaitForChild('Dance')
local humanoid = script.Parent:WaitForChild('Humanoid')
local dance = humanoid:LoadAnimation(animation)
dance.Looped = true
dance:play()

Have you tried this?