I’ve made a localscript that receives a remote fire then uses the ChatMakeSystemMessage to make the announcement. I also make it so it has different color for each item rarities. Everything works except this one rarity named “Prominence”. Unlike any other rarities, I want this rarity’s color to change like rainbow. It does send the announcement but the color is just white and not changing. Any helps with this?
local remotes = game:GetService("ReplicatedStorage"):WaitForChild("Remotes")
-- REMOTES
local crateRemote = remotes:WaitForChild("CrateSpawned")
crateRemote.OnClientEvent:Connect(function(crateannouncement)
local crateColor
if crateannouncement == "Common" then
crateColor = Color3.fromRGB(255,255,255)
elseif crateannouncement == "Rare" then
crateColor = Color3.fromRGB(4, 175, 236)
elseif crateannouncement == "Legendary" then
crateColor = Color3.fromRGB(255, 176, 0)
elseif crateannouncement == "Eccentric" then
crateColor = Color3.fromRGB(255, 0, 0)
elseif crateannouncement == "Sacred" then
crateColor = Color3.fromRGB(0,255,0)
elseif crateannouncement == "Mythical" then
crateColor = Color3.fromRGB(255,0,191)
elseif crateannouncement == "Prominence" then
local rainbowloop = coroutine.wrap(function()
while wait(.01) do
local hue = tick() % 5 / 5
local color = Color3.fromHSV(hue,1,1)
crateColor = color
end
end)
elseif crateannouncement == "Ancient" then
crateColor = Color3.fromRGB(0, 0, 0)
end
local AcrateConfig = {
Text = "A "..crateannouncement.." crate has appeared.",
Color = crateColor,
Font = Enum.Font.SourceSansBold
}
local AncrateConfig = {
Text = "An "..crateannouncement.." crate has appeared.",
Color = crateColor,
Font = Enum.Font.SourceSansBold
}
if crateannouncement == "Legendary" then
game.StarterGui:SetCore("ChatMakeSystemMessage", AcrateConfig)
elseif crateannouncement == "Eccentric" then
game.StarterGui:SetCore("ChatMakeSystemMessage", AncrateConfig)
elseif crateannouncement == "Sacred" then
game.StarterGui:SetCore("ChatMakeSystemMessage", AcrateConfig)
elseif crateannouncement == "Mythical" then
game.StarterGui:SetCore("ChatMakeSystemMessage", AcrateConfig)
elseif crateannouncement == "Prominence" then
game.StarterGui:SetCore("ChatMakeSystemMessage", AcrateConfig)
elseif crateannouncement == "Ancient" then
game.StarterGui:SetCore("ChatMakeSystemMessage", AncrateConfig)
end
end)
Result: