Animation in a DModelPanel Not working?

Hello, I’m working on a basic lua project that involves DModelPanels, and Im attempting to animate it, but through all my sources (Gmod wiki’s and such) I just can get it to work, I end up with a t-posed model. Im using the animation Salute just to test trying to get it to work. I found the Gesture name through another code that has a DModelPanel that actually plays the animation.

	local RightModel = vgui.Create( "DModelPanel", MOTD )
		RightModel:SetPos( ScrW()/1.49, ScrH()/1.9 )
		RightModel:SetPaintBackgroundEnabled( false )
		RightModel:SetSize( 450, 450)
		RightModel:SetColor( Color(255, 255, 255, 255) )
		RightModel:IsDraggable( false )
		RightModel:SetModel( MOTDConfig.RightModel )
		RightModel:SetCamPos(Vector(50, 15, 45))
		RightModel:SetAnimated( true )
		local salute = RightModel:GetEntity():LookupSequence( "gesture_salute" )
		RightModel:GetEntity():SetSequence( salute )
				function RightModel.Entity:GetPlayerColor() return MOTDConfig.RightModelColor end
				function RightModel:LayoutEntity( ent )

Keep in mind I have tried BOTH SetSequence AND ResetSequence both ended in the same result. Thanks in advance!


While you set the sequence correctly, there is nothing telling the model to do anything. You have overwritten that function to do nothing,


Instead, you should try writing it as

function RightModel:LayoutEntity( ent )