Making an Entity Use Animations

I have a model of a horse that I am trying to make rideable. The model has animations for walking and running, but I can’t get the animations to play when you use the horse. Here is the relevant part of the code:

[lua]function ENT:Walking(open)
if self.IsAnimating then return false end
local ANIMATION_TIME = 1.5
self.Entity:SetPlaybackRate(1)
local sequence_d = self.Entity:LookupSequence(“walk_N”)
self.Entity:SetCycle(0)
self.Entity:SetSequence(sequence_d)
self.IsAnimating = true
end
return true
end

function ENT:CheckWeaponControls( driver )

–self.Entity:SetPlaybackRate(1)
local driver = self:GetDriver()
local walk = self:LookupSequence( “walk_N” )
local run = self:LookupSequence( “run_N” )
if driver:IsPlayer() then

if driver:KeyDown( IN_FORWARD ) then
    --self:Walking() -- doesn't work
    --self:DoAnimationEvent( "walk_N" ) -- doesn't work
    --self:SetSequence( "walk_n" ) -- doesn't work
    return true
end

if driver:KeyDown( IN_SPEED ) then
    --self.Entity:SetCycle(0)
    --self:SetSequence( "run_n" )
end    

end
end[/lua]

I’ll admit I have no idea what I’m doing.

self:SetSequence(walk)
you already have walk defined in your code
also, make sure to check if the driver is valid

The driver is valid because the car runs and acts like normal, but doesn’t animate.

Are you calling ent:CheckWeaponControls() constantly?

As far as I know it calls that as long as the key is pressed.