How to align a TextLabel and TextBox based on TextLabel text


I am doing a little side project just to mess around.

This is the UI I am working with, I want it so that it would update the purple text to {gamename}@{username}$ and then the text box would update with it aligned on the left side.

At first I thought about using rich text but I also dont want the purple text to be editable and I’ve seen this type of system on other games and I was just wondering where I could start with this?

Any ideas? Thanks.

1 Like

You can use this property to get the width of the purple part after its Text has been set: TextLabel | Roblox Creator Documentation

1 Like