Just wont animate

So I’m trying to make this gun, and it just wont animate. I’ve tried changing so many different things, but it just will not work, so i was hoping someone on here could help me.

Here’s the lua error I’m getting:

So anyway, here’s my shared.lua file:

You call it like self.StartShowing(ply:EntIndex()) but you never assigned the function to the SWEP table.

function SWEP:PrimaryAttack()
    if !IsValid( self.Owner ) then return end

function SWEP:StartShowing()
    if !IsValid( self.Owner ) then return end


    if SERVER then
        self:CallOnClient('Startanimating', plyindex) -- Wont do anything, theres no SWEP:Startanimating

I fixed that error, but still does not work. It still gives me that same error.

EDIT: I get no lua errors now, but i cannot see any animation. Why is that?

EDIT2: nvm, i fixed it. Seems like it doesn’t work on singleplayer.

Probably because the anim lib you are using is broken and no longer works. Or you are using it incorrectly.

I fixed it. It works just fine now. Thanks a bunch for the help, Robo.