Snake Like UI Text

I want to make UI text animated to make a snake looking effect. I tried this with individual text labels, but when I tested it on mobile it was all squished together. I want to have each individual character move up and down but delayed from the last. I’m not very experienced with this kind of stuff, or most scripting in general so it might just be really obvious how to accomplish this.

I made a post a while back that splits text up into individual text labels, using GetTextSize and some basic math.

That post demonstrates how to make the text shake, but you could easily make it snake up and down by using TweenService, and the Quad, Quint, or Quart EasingStyle.

local TweenService = game:GetService("TweenService")

local tweenInfo = TweenInfo.new(
	1, -- Time
	Enum.EasingStyle.Quint, -- EasingStyle
	Enum.EasingDirection.InOut, -- EasingDirection
	-1, -- RepeatCount (when less than zero the tween will loop indefinitely)
	true, -- Reverses (tween will reverse once reaching it's goal)
	0 -- DelayTime
)
for _, TextLabel in pairs(TextLabels) do

local tween1 = TweenService:Create(TextLabel, tweenInfo, {Position = TextLabel.Position + UDim2.new(0,0,0,50)}) --50 is amount of pixels to snake up
tween1:Play()
wait(0.5)
end
2 Likes

If you know how to use HTML a little bit, then here’s a module script by Defaultio called Rich Text Markup which might help you. Even if you don’t know HTML, it’s kinda easy to learn, hope it helps. https://www.roblox.com/library/1014847041/Rich-Text-Markup

7 Likes

Thanks! This was really helpful!

1 Like

I’ll be sure to check this out

1 Like

I know this post was last active 4 years ago, but I’m trying to use this with the method provided in the shaky text post and this happens;
image
The text ‘snakes’ randomly from what I can see instead of following an order (each character delayed from the last, as OP says)

Is there a way to fix this?