Animation Not Playing For Dummy

My animation wont load for my dummy NPC. But the script works just fine.

StandSummon.OnServerEvent:Connect(function(Player)
	local Character = Player.Character 
	if not Character:FindFirstChild("Stand") then 
		local Standclone = TheWorld:Clone() 
		Standclone.Name = "Stand"
		Standclone.Parent = Character
		Standclone.HumanoidRootPart.CFrame = Character.HumanoidRootPart.CFrame
		
		local standpos = Instance.new("Attachment") 
		standpos.Parent = Character.HumanoidRootPart
		standpos.Name = "StandPosition"
		
		local alignp = Instance.new("AlignPosition")
		alignp.Parent = Standclone
		alignp.Attachment0 = Standclone.HumanoidRootPart.RootRigAttachment
		alignp.Attachment1 = standpos 
		alignp.MaxForce = 6000 
		alignp.Responsiveness = 50
		
		local aligno = Instance.new("AlignOrientation") 
		aligno.Parent = Standclone
		aligno.Attachment0 = Standclone.HumanoidRootPart.RootRigAttachment
		aligno.Attachment1 = standpos 
		aligno.MaxTorque = 6000
		aligno.Responsiveness = 100
		Standclone.AnimationController:LoadAnimation(Standclone.Idle):Play()	

I think you may have forgotten to enclose the function and the if statement with an"end".

1 Like

No, it would have errored and a bunch of red lines would have shown. I just didnt add the rest of the script, thats all.

1 Like