Hello,
I wanted to know, how can we make an effect where a color “crosses” the letters of a textlabel? Basic kind it is light blue and a dark blue color passes over the letters one by one at a certain speed.
Thanks.
Hello,
I wanted to know, how can we make an effect where a color “crosses” the letters of a textlabel? Basic kind it is light blue and a dark blue color passes over the letters one by one at a certain speed.
Thanks.
What do you mean about “crossing”?
Like you have a textlabel which has the TextColor3 white and a color passes over the letters by making a gradient, from left to right.
You could try adding imagelabels per letters and tweening the color , I never really saw this kind of stuff before so don’t expect me to know everything
Use RichText
, for example, like this
La<font color="#20407a">b</font><font color="#3ab5ad">e</font>l
What? I did not understand, why are you sending web code lol ?
Can you elaborate your idea :(?
uhh i put web code to put it in nicer syntax highlighting
also My Idea is to make the text colorful by letter without having to make dozens of textlabels
also thanks to @ketrab2004 for letting me know about this!
So how do you think I can do this?
I believe you can put a UIGradient in a UIStroke with Contextual mode.
to add, you can also do this without a stroke if you want just the text to have a gradient
(text with both a regular gradient and a stroke gradient)
turn on RichText
in the TextLabel
, then put the different colors by repeating <font color="#color-code">letter</font>
for every letter, also replace the letter with a letter you choose, and the color-code
with the color picker, you can go use the Color3 menu or even go here google color picker - Google Search, and copy the HTML code you got, then paste it between the quotation marks
How do I change the color of just one letter ?
Okey so u can use html tags for every letter. HTML tags very useful when you need to change only 1 part of text. Just check tutorial how to use them.
If it’s hard for you u can just do this:
-- GUI
local Container = script.Parent.Container
local lastLetter = nil
local crossInterval = 3.5 -- your interval of crossing
local tickInterval = 0.5 -- interval of letter changing
-- Palette
local oldColor = Color3.fromRGB(255,255,255)
local newColor = Color3.fromRGB(0, 0, 127)
while task.wait(crossInterval) do
for i=1,#Container:GetChildren()-1 do
local v = Container:FindFirstChild(tostring(i))
if v:IsA("TextLabel") then
v.TextColor3 = newColor -- new color
if lastLetter ~= nil then
lastLetter.TextColor3 = oldColor -- old color
lastLetter = nil
end
lastLetter = v
task.wait(tickInterval)
end
end
end
grab the color code then put a while true do
and add task.wait()
after each color change
uhh that is too much instances, like if you have 100,000,000 letters in the text label, then there would be 100,000,000 text labels… so rich text is much better
I will test it soon, if I have a problem I will tell you.
Thanks everyone.
its better than nothing lol because richtext its really hard sometimes
uhh it makes the studio crash with your solution though…
no, i have tested it and it works fine
uhh I tried to put like 100k labels and it doesn’t seem to work well
this variant of code is not for a big amount of instances i think