ReplaceHudColourWithRgba DOESN'T WORK

I’m using the Thread below, but for some reason that I don’t know the ReplaceHudColourWithRgba doesn’t work. I’ve also tried using ReplaceHudColour but I wasn’t successful in the same way.

AddTextEntry is working normally.

Does anyone have any idea what could be causing this? And how to solve?

CreateThread(function()
	while true do
		AddTextEntry('FE_THDR_GTAO', 'Turn Roleplay')
		ReplaceHudColourWithRgba(142,164,76,242,255)

		Wait(1000)
	end
end)

What are you trying to change the colour of? If it’s the text you changed with the AddTextEntry then you could do something like this instead:

AddTextEntry('FE_THDR_GTAO', '~r~Turn Roleplay')

It would produce this:

And you don’t need this in a loop/thread. You can find the colour codes here: Text formatting - Cfx.re Docs

I want to change the color of the game’s HUD.

image

Instead of 142, try 116 like so:

ReplaceHudColourWithRgba(116, 164, 76, 242, 255)

That produces this result for me:
Untitled