Best way to make a looping rainbow color?

I actually have two questions on the topic. I wanted to make a rainbow name/title billboardgui above the player. It will constantly change colors from red to yellow to orange and so on.

My first question is that would that be very laggy if everyone in the server had the rainbow title? There will be 8 players in a server.

Secondly, what would be the best method to execute this? I was thinking I could use tweenservice and tween the GUI text colors to red to orange, then orange to yellow and so on and make a loop like that. But is tweenservice laggy? I also thought I could use a loop and just change the colors manually to red,orange,yellow and so on.

So what would be the most efficient and less lag method?


I would recommend using TweenService within a loop. From my experience it does not hardcore affect performance at all, so you don’t have to worry about lag. I’ve used TweenService to create a rainbow name tag in a server of 24, and there were no performance issues so you don’t have anything to worry about.

TweenService provides a very smooth transition between goals, it would be my go-to.

1 Like

I would use a loop to change colors as you said, as so:

while wait() do
	local hue = tick() % t / t
	local color = Color3.fromHSV(hue, 1, 1)

I have yet to experience lag with this


Just to add on to this reply and mine, @archisaurus correct me if I’m wrong:

You could always localize the transitions of colors too if you’re afraid of latency within the game. When a new tag is added to a new character (be it yourself or another player), use a remote event to fire that tag to all the clients, and on the client side, loop a rainbow transition on that tag. When a player joins the game, use a remote event to fire all existing tags on players within the game to the player so the player can transition the rainbow on the client side.