Capture the flag script not working

So i made a capture the flag script that increases your score when you are close enough to the flag, but it doesnt work with multiple teams

it doesnt print anything and no errors

my script:

local GermanyScore = 0
local AmericaScore = 0
local range = 20

local flag = script.Parent

local Teams = game:GetService("Teams")

local players = game:GetService("Players")

local function FindPlayerNearFlag()
	local PlayerTable = players:GetPlayers()

	for _,v in pairs (PlayerTable) do
		local Character = v.Character
		if not Character then return end

		local HRP = Character:WaitForChild("HumanoidRootPart")
		local Humanoid = Character:WaitForChild("Humanoid")

		local Distance = (HRP.CFrame.p - flag.CFrame.p).Magnitude

		if Distance < range and Humanoid.Health > 0 and v.Team == Teams["Germany"] then
			GermanyScore = GermanyScore + 1
		else if Distance < range and Humanoid.Health > 0 and v.Team == Teams["America"] then
			AmericaScore = AmericaScore + 1
		end
	end
end


	while true do
		FindPlayerNearFlag()
		print(GermanyScore.." Germany")
	print(AmericaScore.." America")
		wait(1)
	end
end

this should be in one word
“elseif” bc u didnt put it in one word it u make another if and the while loop is inside the function

Wow thanks i really made a dumb mistake

Hello, im sorry to bother you but the points only go up for Germany even if im in the American team

nvm found the answer (3O chars)