So I used this tutorial on how to make a over head GUI with a rank system if someone is in a group. if they are not it just shows the players name
But I was wondering if its possible to check if a player owns a badge in my game and if they do it would display “Early Tester” on top
Above Here is how the normal one looks
Above this is how the one with the “Early Tester” would look like
The Rank and Group Labels have the visible set off and so would the "Early Tester TextLabel
Just to make things easy the scripts are below vvv
(This is the normal Script below)
local Players = game:GetService("Players")
local rankInformation = require(script.RankInformation)
local connections = {}
local overHeadTemplate = script.OverheadGui
Players.PlayerAdded:Connect(function (player)
connections[player] = player.CharacterAdded:Connect(function (character)
local newOverhead = overHeadTemplate:Clone()
newOverhead.PlayerName.Text = player.Name
for _, info in pairs (rankInformation) do
local isPlayerInDivision = player:IsInGroup(info.groupId)
if isPlayerInDivision then
newOverhead.Group.Text = info.name
newOverhead.Group.TextColor3 = info.color
newOverhead.Group.Visible = true
newOverhead.Rank.Text = player:GetRoleInGroup(info.groupId)
newOverhead.Rank.Visible = true
end
end
character:WaitForChild("Humanoid").DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
newOverhead.Parent = character:WaitForChild("HumanoidRootPart")
end)
end)
Players.PlayerRemoving:Connect(function (player)
if connections[player] then
connections[player]:Disconnect()
connections[player] = nil
end
end)
(This is the ModuleScript below )
return {
{
name = "Zentryte",
color = Color3.fromRGB(0, 170, 255),
groupId = 3371398
},
{
name = "name",
color = Color3.fromRGB(255, 0, 0),
groupId = 0
}
}
basically just want it so when a player joins that earned the badge it displays the Tester label above them.
Thanks if anyone can help