How can i do a frame with all badges?

  1. What do you want to achieve? I want to do a frame with all game badges, if a player earn one then the frame with the badge turn green.

  2. What is the issue? i tried to do a script for all (for avoid too many while wait() do), but it is not working (it is a localscript). For more information ask me

while wait(10) do
for i,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChildOfClass("Frame") then

local BadgeService = game:GetService("BadgeService")
		local id = script.Parent[v.Name].badgeID.Value 
local plr = game.Players.LocalPlayer
if  BadgeService:UserHasBadgeAsync(plr.UserId, id) then
	script.Parent[v.Name].BackgroundColor3 = Color3.fromRGB(85, 255, 0)
	script.Parent[v.Name].LayoutOrder = -1
end
	end
	end
	end

image

Maybe try replacing

	script.Parent[v.Name].LayoutOrder = -1

by

	script.Parent[v.Name].LayoutOrder = 	script.Parent[v.Name].LayoutOrder - 1
1 Like

Ty for answer. It isn’t working… I have the badges and the images are white (not green)

What exactly isn’t working?
The badges’ color isn’t being replaced?

1 Like

yes look

image

I think this post may help you

1 Like