i just followed the tutorial and it doesn’t show how to keep the award gui from showing if the player has the badge. here is the link and the script :
badge giver :
local badgeService = game:GetService("BadgeService")
local egg = script.Parent
local replicatedStorage = game:GetService("ReplicatedStorage")
local remoteEvents = replicatedStorage:WaitForChild("RemoteEvents")
local badgeEvent = remoteEvents:WaitForChild("BadgeCollected")
local newCollectedEvent = remoteEvents:WaitForChild("NewCollected")
local name = "Chicken"
local imageId = "rbxassetid://11926570417"
function debounce(functions)
local isRunning = false
return function(hit)
if not isRunning then
isRunning = true
functions(hit)
wait(5)
isRunning = false
end
end
end
local function giveBadge(player, badgeId)
local success, badgeInfo = pcall(function()
return badgeService:GetBadgeInfoAsync(badgeId)
end)
if success then
if badgeInfo.IsEnabled then
local success, result = pcall(function()
newCollectedEvent:FireClient(player, name, imageId)
return badgeService:AwardBadge(player.UserId, badgeId)
end)
if not result then
badgeEvent:FireClient(player)
end
end
end
end
egg.Touched:Connect(debounce(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local character = hit.Parent
local player = game:GetService("Players"):GetPlayerFromCharacter(character)
if player then
giveBadge(player, 2130092205)
end
end
end))
link : How To Make A Find The... Game On Roblox - Part 1 (2022) - YouTube
there’s 6 part