Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to cheack if a player has a badge and update a gui?

i want to make a scrip that check if a player onw a badge and in a gui that appear and dissapear update a frame whit a ? can someone help me?

2 answers

✓ Accepted answer

You can check if a user owns a badge using BadgeService:UserOwnsBadgeAsync().

local BadgeService = game:GetService("BadgeService")
local BadgeId = 000000000000

-- Check every player that joins if they own the badge
game:GetService("Players").PlayerAdded:Connect(function(player)
	if not BadgeService:UserOwnsBadgeAsync(player.UserId, BadgeId) then
		return -- Cancelling the function early if the player doesn't have the badge
	end
	
	print(player.Name .. " owns the badge!")
end)

2 comments

0

sorry i dont specific my question but i want to know how update the gui that i already know same thanks but if you can help me whit that

0

You can set the visibility of a frame using Frame.Visible

This discussion is preserved as it was. New answers, comments, and votes are closed.