Entity stops moving when rolling?

Hi, i’ve got my entity to roll but when i do roll it stops moving forward even though im still holding forward down.

Here’s my code for the roll:
[lua]
function ENT:PhysicsSimulate( phys, deltatime )

if self.Pilot and self.Pilot:IsValid() then

	if self.Inflight then
	local num=0
	
	if( self.epodo == true ) and self.Pilot:KeyDown(IN_FORWARD) then
		num=1500
		self:SetMovingForward(true)
	elseif self.Pilot:KeyDown(IN_FORWARD) then
		num=500
		self:SetMovingForward(false)
	elseif self.epodo == false and self.Pilot:KeyDown(IN_MOVELEFT) then
		num=500
	elseif self.epodo == false and self.Pilot:KeyDown(IN_MOVERIGHT) then
		num=500
	elseif self.Pilot:KeyDown(IN_BACK) then
		num=-500
	elseif self.Pilot:KeyDown(IN_FORWARD) and self.InRoll == true then
		num=1250
end


	phys:Wake()
		self.Accel=math.Approach(self.Accel,num,10)
		if not self.Hover then
		if self.Accel>-200 and self.Accel < 200 then return end --with out this you float
		end

	local pr={}
		pr.secondstoarrive	= 1
		if  self.Pilot:KeyDown( IN_DUCK ) then 
			pr.pos = self.Entity:GetPos()+self.Entity:GetUp()*-200
		elseif  self.Pilot:KeyDown( IN_JUMP ) then 
			pr.pos = self.Entity:GetPos()+self.Entity:GetUp()*300
		elseif self.Pilot:KeyDown( IN_MOVERIGHT ) then 
			pr.pos = self.Entity:GetPos()+self.Entity:GetRight()*400
		elseif self.Pilot:KeyDown( IN_MOVELEFT ) then 
			pr.pos = self.Entity:GetPos()+self.Entity:GetRight()*-400
		else 
			pr.pos = self.Entity:GetPos()+self.Entity:GetForward()*self.Accel
		end
		
		    if self.epodo == true and self.Pilot:KeyDown( IN_MOVERIGHT ) then
				self.KeyTime = CurTime()+2;
				--move.pos = move.pos+self.Entity:GetRight()*400					
				self.Roll = self.Roll + 2.5;
				if(self.Roll > self.MaxRoll) then
					self.Roll = self.MaxRoll;
					self.InRoll = true
					self:SetMovingForward(true)
				end
			
		
			elseif self.epodo == true and self.Pilot:KeyDown( IN_MOVELEFT ) then
				self.KeyTime = CurTime()+2;
				--move.pos = move.pos+self.Entity:GetRight()*-400
				self.Roll = self.Roll - 2.5;   --315 -> 360
				if(self.Roll < -self.MaxRoll) then
					self.Roll = -self.MaxRoll;
					self.InRoll = true
					self:SetMovingForward(true)
				end
			if self.epodo == false then
			if self.InRoll == true then
			self.Roll=0
			end
		end
		
		if (CurTime() > self.KeyTime) then
			if (self.Roll != 0) then
				if (self.Roll > 0) then
					self.Roll = self.Roll - 1;
				elseif(self.Roll < 0) then
					self.Roll = self.Roll + 1;
				end
			end
		end
	end	
		pr.maxangular		= 5000
		pr.maxangulardamp	= 10000
		pr.maxspeed			= 1000000
		pr.maxspeeddamp		= 10000
		pr.dampfactor		= 0.8
		pr.teleportdistance	= 5000
		local ang = self.Pilot:GetAimVector():Angle()
		ang.r=ang.r+self.Roll;  --Borrowed from LightDemons Code :D
		pr.angle			= ang --+ Vector(90 0, 0)
		pr.deltatime		= deltatime
	phys:ComputeShadowControl(pr)
		end



local pos = self.Entity:GetPos();

if self.epodo == true then
if (self.Inflight and self.DroneCount < 10) then

		if self.Pilot:KeyDown(IN_ATTACK) then 
			local vel = self.Entity:GetVelocity();
			local up = self.Entity:GetUp();
			-- calculate the drone's position offset. Otherwise it might collide with the launcher
			local offset = StarGate.VelocityOffset({Velocity=vel,Direction=up,BoundingMax=self.Entity:OBBMaxs().z});
			local e = ents.Create("drone");
			e.Parent = self.Entity;
			e:SetPos(pos+offset);
			e:SetAngles(self.Entity:GetForward():Angle()+Angle(math.random(-2,2),math.random(-2,2),math.random(-2,2)));
			e:SetOwner(self.Entity); -- Don't collide with this thing here please
			e.Owner = self.Entity.Owner;
			e:Spawn();
			e:SetVelocity(vel);
			self.DroneCount = self.DroneCount + 1;
			self.Drones[e] = true;
			-- This is necessary to make the drone not collide and explode with the cannon when it's moving
			e.CurrentVelocity = math.Clamp(vel:Length(),0,self.DroneMaxSpeed-500)+500;
			e.CannonVeloctiy = vel;
		end
end

if self.Inflight then
	self.Track = false
		if self.Pilot:KeyDown(IN_ATTACK2) then
		self.Track = true
		end 
	end
end

end
end
[/lua]

Any help would be brilliant

Why are you doing this in PhysicsSimulate? As far as I know, it’s not working because you’re overriding the default physics. You should try and put that code in Think.

I’ve fixed it now. I couldn’t move forward because it was moving left aas i hadn’t defined that couldn’t move left or right when rolling.