[Please Help ;—; ] Support on changing a text depending on a value

I have a ‘set’ system in my game, and I want a TextLabel to say “Part of the … Set”. My problem here is I am using Defaultio’s RichText Module so that I could make the … part of the text bold so it stands out. Whenever you click the ‘item’ button a LocalScript takes the value of the StringValue inside of the button and replicates it to the ‘MainValue’ you could say. And I am doing

wait(5)
local frame = script.Parent--frame (needed for RichText to work)
local richText = require(game.ReplicatedStorage.ModuleScripts.RichText)--module
--_______________________________//
local function change(text)--this was'nt the original thing I did but this is my third try and doesn't work
	local textObject = richText:New(frame, text)
	textObject:Animate(true)
end
local set = script.Parent.Parent.Parent.Main.Set
set.Changed:Connect(function()
	local Text = "<Font=GothamSemibold><Color=White><TextScale=.625><AnimateStyle=Fade><AnimateStepFrequency=1><AnimateStyleTime=0.5>Part of the <Font=GothamBold><Color=White><AnimateStyle=Fade><AnimateStepFrequency=1><AnimateStyleTime=0.5>"..set.Value.."<Font=GothamSemibold><Color=White><AnimateStyle=Fade><AnimateStepFrequency=1><AnimateStyleTime=0.5>  set" --Everything in here is just a part of the module
	change(Text)
end)

And I can not get it right. It’s pretty late here so maybe im just being dumb, but please if anyone has suggestions… please share them
Thank You!
EDIT: The ‘MainValue’ is changing but the text wont :smiley:

1 Like

Is it changing on the server or client? If it is changing on the client, FilteringEnabled will mean its not actually changing on the server, so if this is a server script, then it’s not ever changing for the server. If it is changing for whichever side (client/server) you listen to the event on, possibly try not using the richtext module, as it could be messing something up. I’ve never used this module, so it might not be the module’s issue. Also, are there any errors in the output? If so that would be helpful to know. And if you want to check it’s actually detecting the change, you can put a print("changed!") in the set.Changed event, and check that it prints.

2 Likes

This is done on the client’s side, and I checked, and no not any errors in the output. It probably has something to do with the text being animated, Ill have to look into that, thanks for replying :slight_smile:

1 Like