Hello developers,
I need some help with making text update with the hole server. What I am doing is filtering text and updating a text lable to the filter text. I’m using a script to filter the text and update it. The error I’m getting is the text is not updating.
Scripts
-- Script
game:GetService("ReplicatedStorage").RemoteEvent.OnServerEvent:Connect(function(plr, txt)
local filteredString = game:GetService("Chat"):FilterStringForBroadcast(txt, plr)
game.StarterGui.ScreenGui.TextBox.Text = filteredString -- This should update the text
print(filteredString)
end)
-- Local Script
local textbox = script.Parent.TextBox
textbox.FocusLost:Connect(function(enterPressed)
if not enterPressed then
return
else
game:GetService("ReplicatedStorage").RemoteEvent:FireServer(textbox.Text)
end
end)