Vehicle/Seat Animation

Whenever I sit on a seat or in a vehicle the animation T-Poses or just stands there instead of doing the animation. Here’s the code:

[lua]

function GM:SetPlayerAnimation( ply, anim )

local act = "";

local skipanimation = false;
local activeweap = ply:GetActiveWeapon();

if( not ply:GetTable().ForcedAnimationMode and not skipanimation ) then

	if( ply:OnGround() and ply:WaterLevel() < 4 ) then

		local cansprint = true;
	
		if( ply:Crouching() ) then
			act = "CROUCH";
			cansprint = false;
		else
			act = "STAND";
		end
		
		if( activeweap:IsValid() ) then

			if( activeweap:GetTable().TS2HoldType ) then
			
				act = act .. "_" .. activeweap:GetTable().TS2HoldType;
			
			elseif( AnimConvert[activeweap:GetClass()] ) then
			
				act = act .. "_" .. AnimConvert[activeweap:GetClass()];
			
			end
		
		end
		
		if( not ply:GetPlayerHolstered() ) then
		
			act = act .. "_AIM";
		
		end
		
		local vel = ply:GetVelocity():Length();

		if( vel == 0 ) then
		
			act = act .. "_idle";
		
		elseif( vel > 120 and cansprint ) then
		
			act = act .. "_run";
		
		else
		
			act = act .. "_walk";
		
		end
		
	else
	
		act = "jump";
	
	end
	
            ------------------------------------------
	if( ply:InVehicle() ) then
	
		act = "CROUCH";
	
	end
            ------------------------------------------
	
	local AnimTable = { }
	
	if( ply:GetTable().AnimLastModel ~= ply:GetModel() ) then
	
		ply:GetTable().AnimTable = FindCorrectAnimTable( ply:GetModel() );
		ply:GetTable().AnimLastModel = ply:GetModel();
		
	end
	
	AnimTable = ply:GetTable().AnimTable;

	act = AnimTable.Anim[act] or 1;

else

	act = ply:GetTable().ForcedAnimation;

end

local seq;

if( type( act ) == "string" ) then
	seq = ply:LookupSequence( act );
else
	seq = ply:SelectWeightedSequence( act );
end

--If we're already playing this sequence, let's not restart it!
if( ply:GetSequence() == seq ) then return; end

ply:SetPlaybackRate( 1 );
ply:ResetSequence( seq );
ply:SetCycle( 0 );

end
[/lua]

I have set the act to ‘CROUCH’, ‘SIT’, ‘sit’, ‘crouch’ and nothing seems to be working. I have placed a print in there and it works correctly and changes the act, but the animation does not change for some reason.

I really wouldn’t know properly as I’ve never worked with Animations but from what I can see it looks fine.