Animated Magazine while firing
I'm trying to set up a gun that has a magazine that cycles between two frames while firing. In the past, I've had magazines that change frame depending on the ammo left, so I know magazine frames can at least be changed in realtime.
I tried this to change the frame after every shot, the idea being that it's one frame on odds and the other frame on evens. Put on the magazine itself
Code:
function Update(self)
if self.RoundCount % 2 == 0 then
self.Frame = 0
else
self.Frame = 1
end
end
It does nothing. It doesn't even output errors in the console, on initialization or when the gun is active.