so i am trying to make a vibe game but none of the different seat animations are working. all it does is play the animations for a second then stop. Is there something wrong with the way its formatted or is it the script itself. rn this is the current script i found

seat = script.Parent
function added(child)
	if (child.className=="Weld") then
		human = child.part1.Parent:FindFirstChild("Humanoid")
		if human ~= nil then
			anim = human:LoadAnimation(seat.sitanim)
			anim:Play()
		end
	 end
end

function removed(child2)
	if anim ~= nil then
		anim:Stop()
		anim:Remove()
	end
end

seat.ChildAdded:connect(added)
seat.ChildRemoved:connect(removed)

i have the script saved in the seat as well as the animation