Animation Not Running (For a Model)

Hey there. I’ve got an elevator animation that I am trying to run. I plan on putting it in a loop so it continues running over and over after a certain time. To make it easier for you, here is the setup:

The script I am pasting is a normal script inside of Workspace. It is trying to play an animation via another item in Workspace called ‘‘DoorA’’ which has an Animation Controller and an Animation inside of it. I get one red-line error when I run the code. ‘‘Unable to cast value to Object.’’

I’d appreciate it if someone could inform me on what I am doing wrong, or if the method I used to use is deprecated. Thank you.

local DoorLeftAnimation = game.Workspace.DoorA
1 Like