Bassically I have this script that would make the text label visible if the player owns that badge but its not working
This is the script
local BadgeService = game:GetService("BadgeService")
local BadgeId = 2124623689
game:GetService("Players").PlayerAdded:Connect(function(player)
if BadgeService:UserHasBadge(player.UserId, BadgeId) then
script.Parent.Parent.OwnBadge1.Visible = false
else
script.Parent.Parent.OwnBadge1.Visible = true
end
end)
The OwnBadge1 Text is the text that would become visible
local BadgeService = game:GetService("BadgeService")
local BadgeId = 2124623689
game:GetService("Players").PlayerAdded:Connect(function(player)
if BadgeService:UserHasBadge(player.UserId, BadgeId) then
script.Parent.Parent.OwnBadge1.Visible = true
else
script.Parent.Parent.OwnBadge1.Visible = false
end
end)
you set the text to visible = false if player owns badge that’s why its not working
i recommend not using playeradded event on local script.
local BadgeService = game:GetService("BadgeService")
local BadgeId = 2124623689
local player = game.Players.LocalPlayer
if BadgeService:UserHasBadge(player.UserId, BadgeId) then
script.Parent.Parent.OwnBadge1.Visible = true
else
script.Parent.Parent.OwnBadge1.Visible = false
end