I am making a custom developer console (since the F9 one doesn’t look cool enough >:(((), and I wanna make the input text be coloured. So if you typed warn, it would be orange. Or, if you typed error, it would be red.
I have… absolutely no idea how to do this. The only thing I know how to do is coloured rich text. Any ideas?
Sorry if this didn’t work, i’m on mobile right now
local highlighted = {
testword = Color3.fromRGB(255,100,0)
}
local text = script.Parent.Text -- LocalScript under the TextLabel
local newtext = ""
for _, word in text:split(" ") do -- Split the words, then iterate over them
local iscolored = false
for i, color in highlighted do
if word == tostrin(i) then -- Check if word needs to be highlighted
newtext ..= '<font color="rgb("' .. color.R .. ',' .. color.G .. ',' .. color.B .. '">' .. word .. '<\font>' .. " "
iscolored = true
break
end
end
if not iscolored then
newtext ..= word .. " " -- Adding Space after word
end
end
script.Parent.Text = newtext
Edit : Whoops, didn’t mean to reply to you, sorry
But also, you can’t use richtext on TextBoxes, maybe try what nicemike40 said