Animations not playing for some weird reason

when i try to play an animation on an npc that i have stored inside of a viewport frame, it doesn’t play. the print statements print but the animation still refuses to play. what am i doing wrong?

local function setHorseAnims()
	print("loaded animation") -- prints with no issue
	local horseFrame = gui:WaitForChild("horse-frame")
	local realHorse = horseFrame:FindFirstChild("horse")
	local horseHumanoid = realHorse:FindFirstChildWhichIsA("Humanoid")
	local animator = horseHumanoid:FindFirstChildWhichIsA("Animator")
	local horseAnim = animator:LoadAnimation(script:WaitForChild("idle"))
	horseAnim.Priority = Enum.AnimationPriority.Action
	horseAnim.Looped = true
	horseAnim:Play()
	
	if horseAnim.IsPlaying then
		print("playing") -- prints also
	else
		warn("not playing for some reason")
	end
end

-- later in the script i call the function

Is your rig stored within a WorldModel?

1 Like

i forgot i needed a WorldModel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.