Help with notification

I’m trying to make a script that sends a notification to every player on a team whenever the team leader disbands it. When the party leader clicks the disband button it goes through everyone on their team and then checks to see if they have the same username (to make the sure notification doesn’t get sent to the party leader) and if they have different names, then it sends the notification to the teammate. The problem is whenever the party leader clicks the button, it sends 1 notification per every player in the team. For example, if there are 3 players on the team, it will send the notification 3 times to each player. How do I fix this so that it only sends once per player?

for _, teammate in (game.Players.LocalPlayer.Team:GetPlayers()) do
						if teammate.Name ~= game.Players.LocalPlayer.Name then
							DisbandTeamNotification:FireServer(teammate)
						end
					end

Fixed, I accidentally had two of the same loop and didn’t realize it which is why it sent the notification twice

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.