#rainbow overhead text issue

18 messages · Page 1 of 1 (latest)

quiet gust
#

i'm tryna make a rainbow overhead text type thing but it's not working the way i want it to, this is what it looks like now and i want it to look like the rainbow overhead texts you usually see in games and whatnot; how can i do that?

heres the code:

local TweenService = game:GetService("TweenService")
local Players = game:GetService("Players")

local tag = script.Parent.Parent

local gradient = script.Parent

gradient.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)),
    ColorSequenceKeypoint.new(0.25, Color3.fromRGB(255, 255, 0)),
    ColorSequenceKeypoint.new(0.5, Color3.fromRGB(0, 255, 0)),
    ColorSequenceKeypoint.new(0.75, Color3.fromRGB(0, 255, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 0, 255))
})

local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1, false)
local tween = TweenService:Create(gradient, tweenInfo, { Offset = Vector2.new(1, 0) })

tween:Play()```
dull birch
#

u can use a loop and set the offset to like 0 or whatever offset makes it look like the start of the gradient, then just play the tween after that

quiet gust
dull birch
regal dew
#

nvm im dumb

dull birch
hybrid ruin
#

you set reverses to false.

#

set it to true

#

local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In, -1, true)

hybrid ruin
#

isnt that what you want?

quiet gust
hybrid ruin
dull birch
# quiet gust something like in this video with the gradient nametags except it's rainbow in t...

i believe doing this is the same sort of effect they do but it doesnt look good with rainbow, as the start and end colors would have to be the same for it to look smooth

local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.In)

while true do
    local tween1 = TweenService:Create(gradient, tweenInfo, { Offset = Vector2.new(1, 0) })
    tween1:Play()
    tween1.Completed:Wait()
    
    gradient.Offset = Vector2.new(-1, 0)
    
    local tween2 = TweenService:Create(gradient, tweenInfo, { Offset = Vector2.new(0, 0) })
    tween2:Play()
    tween2.Completed:Wait()
end
#

there could be other ways to achieve that effect though, this is the only one i know