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