SetModelScale for GMod13??

This is an old piece of code:

[lua] if Percent <= 1 then
local W = SWidth + (Percent * MaxWidth );
self:SetModelScale(.05 * Vector(W, W, SHeight + (Percent * MaxHeight)));

However this doesn’t work anymore in GMod13, can anybody convert this? This has puzzled me all day.

Thanks in advance.

Entity:SetModelScale( number scale, number deltaTime )
ent:SetModelScale( ent:GetModelScale() * 1.25, 1 );

SetModelScale now needs the time it takes to scale

P.s. try searching the wiki next time :slight_smile:

That isnt going to work, hes scaling by a vector
You need to use EnableMatrix