I made a somewhat more of an advanced script and I got everything to work except for color updating when you get a rankup or something. So How could I make the color update with this code?
--Place the script named Rank Script in Workplace
--Place the BillboardGui named Rank in ServerStorage
--Created by centerspell
ranks = {
[243] = Color3.new(255/255, 255/255, 255/255),
[244] = Color3.new(255/255, 0/255, 0/255),
[245] = Color3.new(139/255, 0/255, 0/255),
[246] = Color3.new(255/255, 255/255, 0/255),
[247] = Color3.new(199/255, 199/255, 0/255),
[248] = Color3.new(0/255, 128/255, 0/255),
[249] = Color3.new(0/255, 100/255, 0/255),
[250] = Color3.new(0/255, 0/255, 255/255),
[251] = Color3.new(0/255, 255/255, 255/255),
[252] = Color3.new(220/255, 220/255, 220/255),
[253] = Color3.new(169/255, 169/255, 169/255),
[254] = Color3.new(255/255, 145/255, 0/255),
[255] = Color3.new(222/255, 0/255, 255/255)
}
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function()
local rank = plr:GetRankInGroup(1214054)
local role = plr:GetRoleInGroup(1214054)
if rank ~= 0 then
local rankd = game.ServerStorage.Rank:Clone()
repeat wait() until plr.Character
rankd.Parent = plr.Character.Head
rankd.TextLabel.Text = role
rankd.TextLabel.TextColor3 = ranks[rank]
end
end)
end)
