I can’t figure out how to connect them all together and script them to work. Trying to get it where depending what group you’re in it’ll show the group and the rank your are in the group. I don’t really know how to script much and internet isn’t helping much so idk what to do. Could I get sum help?
For the overhead Gui I suggest using a BillboardGui
As for retrieving Group info (assuming you’re talking about on-site roblox Groups)
You can use GroupService
, GroupService:GetGroupsAsync()
, Player:IsInGroup
(if you need to check if the player is in the specified group) and Player:GetRankInGroup()
I recommend reading the Documentation on GroupService
and Players
since they have methods involving Groups that will be useful to you.
I mean I using the bill board gui but idk how to properly script it to where it shows the name, branch and rank
local groupservice = game:GetService(“GroupService”)
local players = game:GetService(“Players”)
local Gui = script.OverheadGui
local GroupID = 15568521
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
char.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
local clonedUI = Gui:Clone()
clonedUI.Parent = char.Head
clonedUI.PlayerName.Text = player.Name
if player:IsInGroup(32337939) then
clonedUI.Branch.Text = player:IsInGroup(32337939)
clonedUI.Rank.Text = player:GetRoleInGroup(32337939)
clonedUI.Rank.TextColor3 = Color3.new(0.85098, 0.85098, 0)
else clonedUI.Rank.Text = player:GetRoleInGroup(GroupID)
end
clonedUI.Rank.Text = player:GetRoleInGroup(32337939)
if player:GetRankInGroup(13553458) <= 250 then
clonedUI.Regimental.Text = player:GetRoleInGroup(13553458)
clonedUI.Regimental.TextColor3 = Color3.new(0.666667, 0, 0)
elseif
player:GetRankInGroup(11301031) <= 253 then
clonedUI.RegimentalG.Text = "[R-GG]"
clonedUI.Regimental.Text = player:GetRoleInGroup(11301031)
clonedUI.Regimental.TextColor3 = Color3.new(0.596078, 0.368627, 0.00392157)
elseif
player:GetRankInGroup(11241531) == 0 then
clonedUI.Regimental.Text = "Civillian"
clonedUI.Regimental.TextColor3 = Color3.new(0.301961, 0.301961, 0.301961)
elseif
player:GetRankInGroup(11241531) >= 250 then
clonedUI.RegimentalG.Text = "[HQ]"
clonedUI.Regimental.Text = "Headquarters"
clonedUI.Regimental.TextColor3 = Color3.new(0.85098, 0.85098, 0)
clonedUI.RegimentalG.TextColor3 = Color3.new(0.85098, 0.85098, 0)
else
clonedUI.Regimental.Text = "Enlisted Personnel"
clonedUI.Regimental.TextColor3 = Color3.new(0.909804, 0, 0)
clonedUI.RegimentalG.Visible = false
end
end)
end)