I am trying to make some Icons for a nametag but different ranks only have certain nametags and i want them to be a certain space apart no matter what so i was wondering if there is a way to make this work?
I have tried nothing so far.
Code
local GroupId = 11587846
local nametagtemplate = game.ReplicatedStorage.nametag
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local rank = Player:GetRoleInGroup(GroupId)
local Hd = Character.Head
local NameTag = nametagtemplate:Clone()
NameTag.Parent = Hd
NameTag.Adornee = Hd
Character.Humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
local username = Player.Name
local dispname = Player.DisplayName
NameTag.user.Text = username
NameTag.disp.Text = "@" .. dispname
NameTag.rank.Text = rank
NameTag.dev.Visible = false
NameTag.staff.Visible = false
NameTag.owner.Visible = false
local rankdid = Player:GetRankInGroup(GroupId)
print(rankdid)
if rankdid >= 252 then
NameTag.staff.Visible = true
end
if rankdid == 253 then
NameTag.staff.Visible = true
NameTag.dev.Visible = true
end
if rankdid == 254 then
NameTag.staff.Visible = true
NameTag.dev.Visible = true
end
if rankdid == 255 then
NameTag.owner.Visible = true
NameTag.staff.Visible = false
NameTag.dev.Visible = false
end
if rankdid >= 253 then
while true do
math.randomseed(tick())
local rColor = Color3.new(math.random(),math.random(),math.random())
for i = 0 ,1, .05 do
NameTag.user.TextColor3 = NameTag.user.TextColor3:Lerp(rColor,i)
NameTag.disp.TextColor3 = NameTag.disp.TextColor3:Lerp(rColor,i)-- RGB
NameTag.rank.TextColor3 = NameTag.rank.TextColor3:Lerp(rColor,i) -- RGB
wait()
end
wait(.01)
end
end
end)
end)
Please let me know
Scripter/Dev Kieranl29_.