WEIRD model matrix problems

I can’t get ent:EnableMatrix() to work. I tried using the method on the wiki in several different ways, and nothing works. Does “Matrix()” have to be a specific matrix relating to the entity’s model? I created a simple SWEP to test it. This is like version 7 of the SWEP…

if (SERVER) then

AddCSLuaFile(“shared.lua”)

SWEP.Weight = 1
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = false

end

if (CLIENT) then

SWEP.PrintName = “testgun”
SWEP.Slot = 1
SWEP.SlotPos = 1
SWEP.DrawAmmo = false
SWEP.DrawCrosshair = true

end

SWEP.Author = “For Science”
SWEP.Contact = “”
SWEP.Purpose = “”
SWEP.Instructions = “”
SWEP.Category = “Other”

SWEP.Spawnable = true
SWEP.AdminSpawnable = true

SWEP.ViewModel = “models/weapons/v_pistol.mdl”
SWEP.WorldModel = “models/weapons/w_pistol.mdl”

SWEP.Primary.ClipSize = -1
SWEP.Primary.DefaultClip = -1
SWEP.Primary.Automatic = false
SWEP.Primary.Ammo = “none”

SWEP.Secondary.ClipSize = -1
SWEP.Secondary.DefaultClip = -1
SWEP.Secondary.Automatic = false
SWEP.Secondary.Ammo = “none”

//-------------------------------------------------Important stuff starts here

function SWEP:PrimaryAttack()

print(“Primary works!”)
local ent = self.Owner:GetEyeTrace().Entity
if !ent:IsValid() or ent == nil or ent == NULL or !isstring(ent:GetModel()) then return end
print(“Entity is valid!”)
SetGlobalEntity(“ResizerEnt”, ent)
print(“Entity is global!”)

end

if (CLIENT) then

function SWEP:PrimaryAttack()

timer.Simple(5, function()
local ent = GetGlobalEntity(“ResizerEnt”)
local mat = Matrix()
mat:Scale(Vector(0.5, 0.5, 0.5))
ent:EnableMatrix(“RenderMultiply”, mat)
end)

end

end