I will explain my script briefly. This script is normal script. It is located in the door. The door has a "Handle" with a click detector in it. This is not the point. Let's move on to the second part of the script. The script detects if the player is in the team. If so, the door stops. is de-anchored and the player has to play the animation, the problem is that the animation does not work.
To help you troubleshoot the problem, this is the only error underlined in yellow on the console. " ? Infinite yield possible on 'Workspace.KotyOceloty:WaitForChild("humanoid")' (x2) - Studio"
function Open(player)
if player.Team == game.Teams["DOR Members"] then
if opened == false then
opened = true
for i = 1, 10 do
script.Parent:SetPrimaryPartCFrame(Hinge.CFrame*CFrame.Angles(0, math.rad(9), 0))
wait()
end
else
opened = false
for i = 1, 10 do
script.Parent:SetPrimaryPartCFrame(Hinge.CFrame*CFrame.Angles(0, math.rad(-9), 0))
wait()
end
end
end
if player.Team == game.Teams.Interpol then
local copy = game.ReplicatedStorage.Door:Clone()
local remain = game.ReplicatedStorage.CopyDoor:Clone()
--animation script start
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID="..8293367949
--here the console shows I have a problem.(down)
local loadedAnimation = game.Workspace[player.Name].Humanoid:LoadAnimation(animation)
game.Workspace["Fbi open up"]:Play()
wait(2.011)
loadedAnimation:Play()
--play animation
wait(0.5)
script.Parent:Destroy()
remain.Parent = game.Workspace
remain.Anchored = false
--makes door fall from upstairs and plays sound
game.Workspace["Wood Breaking"]:Play()
end
end
if someone still does not understand, it has what interests me written in the script. I am asking for a quick answer.

2 comments
This is not an error but warning, :WaitForChild waits for child to exist, if the child won't ever exist it will just wait forever, this is called infinite yield, you possibly wrote "humanoid" wrong since the "h" should be uppercase -> "Humanoid", this is not the script that shows the warning though.
I did everything good but nothing works