Notification script type error?

I want that a Player get a notification bases on team but it gives a type error. I dont know what I’m doing wrong. Please someone help me!

local StarterGui = game:GetService("StarterGui")

local burgerNotification = {
	"Je hebt zojuist 500 euro ontvangen van je uitkering."
}

local politieNotification = {
	"Je hebt zojuist 1500 euro ontvangen van je werkgever."
}

local brandweerNotification = {
	"Je hebt zojuist 1500 euro ontvangen van je werkgever."
}

local kmarNotification = {
	"Je hebt zojuist 2500 euro ontvangen van je werkgever."
}

local dsiNotification = {
	"Je hebt zojuist 3000 euro ontvangen van je werkgever."
}

local TimeBetweenNotifications = 5 --seconds

while true do 
	if game.Players.LocalPlayer.Team == "Burger" then
		wait(10)
		for i = 1, #burgerNotification do
			local Notification = burgerNotification[i]
			
			StarterGui:SetCore("SendNotification", {
				Title = "Systeem Notification",
				Text = Notification,
				Icon = "rbxassetid://8903503093",
				Duration = 15
			})
			wait(TimeBetweenNotifications)
			
	else
		if game.Players.LocalPlayer.Team == "Politie" then
			wait(10)
			for i = 1, #politieNotification do
				local Notification = politieNotification[i]

				StarterGui:SetCore("SendNotification", {
					Title = "Systeem Notification",
					Text = Notification,
					Icon = "rbxassetid://8903503093",
					Duration = 15
				})
				wait(TimeBetweenNotifications
				end
			end
		end

.Team doesn’t give you the team name. It gives you the object. So it won’t be a string but a instance. Try changing the .Team to .TeamColor and the string (like “Burger”) to game.Teams.Burger

I did but i gives a error by “else”

Add end on top of else, if. Because you put a for loop and not using a ending function

And does it check even when a player change the team?

Yes but change the
First if statement at while do to

if game.Players.LocalPlayer.TeamColor == game.Teams.Burger.TeamColor

Btw im not on a computer so im not sure if the property name is Burger.TeamColor or Burger.Color