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"})
textObject:Animate(true)
end
local Text = [[<AnimateStyle=Rainbow>AN ITEM HAS <Color=Red>SPAWNED!<Color=/><AnimateStyle=/>]]
ClickDetector.MouseClick:Connect(function(player)
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, TweenInfo.new(.3, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {
Position = UDim2.new(0.5, 0, 1.1, 0),
}):Play()
TweenService:Create(NPCGUI.Frame, TweenInfo.new(.3, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {
Position = UDim2.new(0.5, 0, 0.8, 0),
}):Play()
wait()
local text = "Hello world!\nLine two!<Img=Thinking>"
local textObject = richtext:New(NPCGUI.Frame.Title, text)
textObject:Animate(true)
end)
dont get confused theres 2 text variables mb
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?