How to align a TextLabel and TextBox based on TextLabel text

Hello.

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

Really late reply but,
Set the TextXAlignment property of the TextLabel to Left/Center/Right based on your preference…

1 Like

:rofl: crazy thread bump, forgot abt this. i tihnk i was talking abt putting two text boxes side by side with differnet checks cause i didnt know abt rich text but thanks for trying.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.