I’ve tried to fix this piece of code to make it so if you have all badges in the game, you get something. But instead, if you have the last badge in the code you get it. Is there anyway to fix this?
(sorry for the messy code)
local BadgeService = game:GetService("BadgeService")
local ServerStorage = game:GetService("ServerStorage")
local trophyNumber = 0
game.Players.PlayerAdded:Connect(function(player)
if BadgeService:UserHasBadgeAsync(player.UserId, 2128283360) then
wait(0.01)
if BadgeService:UserHasBadgeAsync(player.UserId, 2128314658) then
wait(0.01)
if BadgeService:UserHasBadgeAsync(player.UserId, 2128314661) then
wait(0.01)
if BadgeService:UserHasBadgeAsync(player.UserId, 2128332803) then
wait(0.01)
if BadgeService:UserHasBadgeAsync(player.UserId, 2128343571) then
wait(0.01)
if BadgeService:UserHasBadgeAsync(player.UserId, 2128357757) then
wait(0.01)
if BadgeService:UserHasBadgeAsync(player.UserId, 2128476518) then
wait(0.01)
end
end
end
end
end
print("PLAYER HAS ALL BADGES")
game.ServerStorage.Fade_teleporter.Parent = game.Workspace
print(trophyNumber)
end
end
end)