--		if animName == "walk" then
--			local runAnimName = "run"
--			local runIdx = rollAnimation(runAnimName)
--
--			runAnimTrack = humanoid:LoadAnimation(animTable[runAnimName][runIdx].anim)
--			runAnimTrack.Priority = priority or Enum.AnimationPriority.Movement
--			runAnimTrack:Play(transitionTime)		
--			
--			if (runAnimKeyframeHandler ~= nil) then
--				runAnimKeyframeHandler:disconnect()
--			end
--			runAnimKeyframeHandler = runAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)	
--		end

	end
end

function playAnimation(animName, transitionTime, humanoid, speed) 	
	local idx = rollAnimation(animName)
	local anim = animTable[animName][idx].anim

	switchToAnim(anim, animName, transitionTime, humanoid, nil, speed)
	currentlyPlayingEmote = false
end

function playEmote(emoteAnim, name, transitionTime, humanoid, priority, speed)
	switchToAnim(emoteAnim, name, transitionTime, humanoid, priority or Enum.AnimationPriority.Core, speed or 1.0)
	currentlyPlayingEmote = true
end
