Attempt to get length of a userdata value

I made a script to load random animations via a server script, I’m getting this error what the problem?

image

local AnimationFolder = script.Parent.Parent.Animations.NormalCast
local RandomAnimation = AnimationFolder[math.random(1, #AnimationFolder)]

nvm fixed this i need to add :GetChildren() i forgot about that

local AnimationFolder = script.Parent.Parent.Animations.NormalCast:GetChildren()
local RandomAnimation = AnimationFolder[math.random(1, #AnimationFolder)]