function AnimationPlayer.PlayAnimation(c,F)local b=Tool.Parent if b then local c=b:FindFirstChildOfClass("\072\117\109\097\110\111\105\100")if c then local b=Animationids[F]if b then local D=b[c.RigType]if D then local b=c:LoadAnimation(GetAnimation(D))local W=AnimationSettings[F]or{}b:Play(W.FadeTime,W.Weight,W.Speed)return b end else warn("\077\105\115\115\105\110\103 \097\110\105\109\097\116\105\111\110 \110\097\109\101\058 "..tostring(F))end end end end return AnimationPlayer
--Players the animation by name for the tool holder.
function AnimationPlayer:PlayAnimation(AnimationName)
	local Character = Tool.Parent
	if Character then
		local Humanoid = Character:FindFirstChildOfClass("Humanoid")
		if Humanoid then
			local AnimationGroup = Animationids[AnimationName]
			if AnimationGroup then
				local Animationid = AnimationGroup[Humanoid.RigType]
				if Animationid then
					local LoadedAnimation = Humanoid:LoadAnimation(GetAnimation(Animationid))
					local AnimationData = AnimationSettings[AnimationName] or {}
					LoadedAnimation:Play(AnimationData.FadeTime, AnimationData.Weight, AnimationData.Speed)

					return LoadedAnimation
				end
			else
				warn("Missing animation name: " .. tostring(AnimationName))
			end
		end
	end
end

return AnimationPlayer
