Hi, so I have a header/title/whatever you want to call it using a Overhead GUI and so I have it set through a group role based color that is granted and for some reason, it does give you the rainbow effect, but goes away after you reset.
Here’s some code:
Snippet from one module:
function ProductInfo.Developers(player)
DataModule.RestrictedAreaAccess[player.UserId] = true
ProductInfo.ColoredTitles(player)
HeaderCreator.RainbowHeader(player)
end
Main code for the RAINBOW title:
function HeaderCreator.RainbowHeader(player, header)
local char = player.Character or player.CharacterAdded:Wait()
local header = char:WaitForChild("Head"):WaitForChild("OverheadGui")
local labels, x = {}, 0
for _, inst in pairs(header:GetDescendants()) do
if (inst:IsA("TextLabel") and inst.Name ~= "Label2" and inst.Name ~= "Label4") then table.insert(labels, inst) end
end
coroutine.wrap(function()
while (header.Parent.Parent ~= nil) do
wait(.08)
for _, label in pairs(labels) do
label.TextColor3 = Color3.fromHSV(x,1,1)
x = x >= 1 and 0 or x + 1/255
end
end
end)()
end
function HeaderCreator.CreateTitle(player, developer)
local header = ReplicatedStorage.OverheadGui:Clone()
local groupRole = player:GetRoleInGroup(Configurations.GROUP_ID)
local level = player.player_stats.Level
local locked = false
local rank = player:GetRankInGroup(Configurations.GROUP_ID)
header.Label.Text = "Level ".. level.Value
header.Label2.Text = "- ".. groupRole .. " -"
header.Label3.Text = player.DisplayName
header.Label3.Size = UDim2.new(2,0,0.4,0)
if player.DisplayName == player.Name then
header.Label4.Text = " "
elseif player.DisplayName ~= player.Name then
header.Label4.Text = "@"..player.Name
header.Label4.Size = UDim2.new(2,0,0.25,0)
header.Label4.TextColor3 = Color3.fromHSV(0, 0, 0.588235)
end
header.Size = UDim2.new(5,0,1.5,0)
if (player.Character:WaitForChild("Head"):FindFirstChild("OverheadGui")) then
player.Character.Head.OverheadGui:Destroy()
end
That’s what creates the general headers.
I really don’t know what the issue is, if you need more info let me know.