RichText on serverscripts?

I’m tryna make a richtext function play in a serverscript but it’s not working, does the richtext module work on server scripts

lets see your code then i can help

local ClickDetector = script.Parent.ClickDetector
local interact = false
local TweenService = game:GetService("TweenService")
local richtext = require(game.ReplicatedStorage:FindFirstChild("RichText"))

local function Type(object,text,length)
	local textObject = richtext:New(object, text, {Font = "SourceSansBold"})
local Text = [[<AnimateStyle=Rainbow>AN ITEM HAS <Color=Red>SPAWNED!<Color=/><AnimateStyle=/>]]
	if interact == true then return end
	interact = true
	local PlayerMenu = player.PlayerGui:FindFirstChild("HUD")
	local NPCGUI = game.ReplicatedStorage.NPCTemplate:Clone()
	NPCGUI.Parent = player.PlayerGui
	TweenService:Create(PlayerMenu.Frame,, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {
		Position =, 0, 1.1, 0),
	TweenService:Create(NPCGUI.Frame,, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {
		Position =, 0, 0.8, 0),
	local text = "Hello world!\nLine two!<Img=Thinking>"
	local textObject = richtext:New(NPCGUI.Frame.Title, text)

dont get confused theres 2 text variables mb

i dont think thats how it works go here

Even with the richtext module?

yes that should work learn this and maybe it will work if it doesnt ill find something else

I want it to also animate the text that’s why im using the module

how do you want to animate it?