Skinned Meshes Animation Script Not Working

Hello, I am trying to run an animation of a skinned mesh using a script, but for some reason, there are no errors and it’s not running. However, using the animation editor, it animates perfectly.

This is inside of the skinned mesh model.
image

This is the script i’m using:

local animationController = script:WaitForChild("AnimationController")
local animation = script:WaitForChild("Animation")
local animator = animationController:WaitForChild("Animator")
	
local animationTrack = animator:LoadAnimation(animation)

animationTrack.Looped = true
animationTrack:Play()

Thanks :slight_smile:

The problem was that the ownership had to be set to my group, since the game is published under my group.

1 Like