How do i get this animation to play

local CS = game:GetService("CollectionService")
local UIS = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local DoAnim = script:WaitForChild("DoAnim")

UIS.InputBegan:Connect(function(input, gameProcessed)
	if input.UserInputType == Enum.UserInputType.Keyboard then
		if input.KeyCode == Enum.KeyCode.E and not gameProcessed then
			
			for _,Interactable in pairs(CS:GetTagged("Door")) do
				if CS:HasTag(Interactable, "Door") then
					local Magnitude = (Interactable.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude
					
					if Magnitude <= 6 then
						if Interactable.Parent.Werte:FindFirstChild("OpenOrClose") then
							DoAnim:Play(true)
							Interactable.Parent.Werte.OpenOrClose:FireServer()
						end
					end
				end
			end
		end
	end	
end)

How it tells me error “Play” isnt valid member of animation

Depends on what DoAnim is. What are you trying to animate? For humanoids you should use LoadAnimation.