How would I append some text at the end of a TextBox's input?

I want to make it so that every time you type into a TextBox it adds some text at the end of the new text, that way it basically keeps the placeholder, for example:

Placeholder → S Placeholder → So Placeholder → Som Placeholder → Some Placeholder

local textbox = script.Parent
local Prefix = "Placeholder"

textbox.Text = Prefix

textbox:GetPropertyChangedSignal("Text"):Connect(function()
	if not string.find(textbox.Text, Prefix) then
		textbox.Text = textbox.Text .. Prefix
	end
end)
1 Like

Right… just one thing, the placeholder text is dynamic, it constantly gets updated to the player’s coins, so the placeholder changes with it.

The TextBox looks like this:

  • Coins (100 in account) - when it’s empty
  • 5 (110 in account) - what I’m trying to get when the text changes
  • 50 (120 in account) - what I’m trying to get when the text changes

I decided to scrap this idea and try something else, thanks for helping either way!

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