Hello Developers,
Is it possible to split a Text through different TextLabels?
Example 1: I wanna split “TEST”. So T would be TextLabel1, E would be TextLabel2, S would be TextLabel3 and T would be TextLabel4
I could just do that manually but it doenst look good and it really takes time? Is there like a faster way with splitting text? Sorry for my laziness, but if i like want to split a sentence it would really take long.
What i mean is: Convert that one TextLabel into more different TextLabels is that possible?
If so, then i wanna make each of them rotate or do a function like transparency, position, tweenposition etc.
Example 2:TextLabel1.Rotation +30, TextLabel3.Rotation +30 and i wanna like leave the others dont mind them, so how do i rotate them? Should i just use script.TextLabel1.Rotation +30? If so, sorry for that dumb question, what is important to me is the Example 1 how to split the Text “TEST” into 4 TextLabels
I hope u understand and i would thank you! Thank you for your patience!
local Last = 1
local Text = "TEST"
local Labels = {Label1, Label2, Label3, Label4}
for i = 4, 1, 1 do
local Label = Labels[i]
Last = i
Label.Text = string.sub(Text, Last, i)
end
That should work for you!
(Just replace the table info with the TextLabel stuff, if yk what I mean, lol.)
-- some text
local text = "TEST"
-- split the text into a table
local characters = string.split(text, "")
-- loop each character in the characters table
for i, character in ipairs(characters) do
-- set the TextLabel to the character
SplittedTextLabels["TextLabel" .. i].Text = character
end
if you want something like that which procedurally generates text labels you might wanna look at text bounds or anything else that does the same thing and create text labels like that however having lots of text labels would also work
Okay, try this: (LocalScript under the “SplittedTextLabels” folder!)
local Last = 1
local Text = "TEST"
local Labels = {script.Parent["TextLabel1 (T)"], script.Parent["TextLabel2 (E)"], script.Parent["TextLabel3 (S)"], script.Parent["TextLabel4 (T)"]}
for i = 1, 4, 1 do
local Label = Labels[i]
Last = i
Label.Text = string.sub(Text, Last, i)
end
Hello there,
it works!! Great! But i do have one question, its not really what im looking for but its going in the right direction! I wanna make something like this
So i thought, that the text was splitted from one TextLabel to different TextLabels (like converting one textlabel to different textlabels) Does that work with a plugin or how do i make it look so smooth because it cannot be manually made by just adding thousand textlabels and i should like tween each of them so thats not currently what im looking for, but if u have another idea u can reply to this.
Yeah but how does it know which text it is like if its a player name u cant just add it manually. Is there any way possible in plugin or script form? Also im very sorry if i wasted your time!