Hey, I’ve recently started a project to make something like an “Announcement Panel” and what I am having trouble with is filtering the text that is fired through a remote event.
– Local Script
PromptMessage.Submit.Activated:Connect(function()
local Message = PromptMessage.MessageBox.Text
local playerName = LocalPlayer.Name
if MarketplaceService:UserOwnsGamePassAsync(LocalPlayer.UserId, 1) then
game.ReplicatedStorage.AnnouncementMessage:FireServer(Message)
end
end)
– Server Script
game.ReplicatedStorage.AnnouncementMessage.OnServerEvent:Connect(function(Message)
local filteredText = game:GetService("Chat"):FilterStringForBroadcast(Message)
print(filteredText)
end)
The Error
Argument 2 missing or nil
Line 70 ( which is local filteredText = game:GetService(“Chat”):FilterStringForBroadcast(Message)