--Loop For Making Rays For The Bullet's Trajectory

for i = 1, 30 do
	local thisOffset = offset + Vector3.new(0, yOffset*(i-1), 0)
	local travelRay = Ray.new(point1,thisOffset)
	local hit, position = workspace:FindPartOnRay(travelRay, parts.Parent)

	local distance 		= (position - point1).magnitude
	round.Size				= Vector3.new(1, distance, 1)
	round.CFrame			= CFrame.new(position, point1)
								* CFrame.new(0, 0, -distance/2)
								* CFrame.Angles(math.rad(90),0,0)
	round.Parent			= workspace
	point1					= point1 + thisOffset
	
	if hit then
		round:remove()
		local e = Instance.new("Explosion")
		e.BlastRadius = 4
		e.ExplosionType = "NoCraters"
		e.BlastPressure = 1
		e.Position = position
		e.Parent = workspace
		
		local players = game.Players:getChildren()
		for i = 1, #players do
			
			if players[i].TeamColor ~= script.Parent.Parent.Tank.Value then --if he's not an ally
				character = players[i].Character
				if character then
					torso = character:findFirstChild'Torso'
					if torso then
						
						torsoPos = torso.Position
						origPos = round.Position
						
						local ray = Ray.new(origPos, torsoPos-origPos)
						local hit, position = game.Workspace:FindPartOnRayWithIgnoreList(ray,ignoreList)
						if hit then
							if hit.Parent == character then
								human = hit.Parent:findFirstChild("Humanoid")
								if human then
									distance = (position-origPos).magnitude