I did 2 scripts. One in StarterGui and one in SSS. The one in SSS filters a sting and prints it out correctly. But, when I fire the client it says "nil" when it comes out. Help?
SSS:
local rs = game:GetService("ReplicatedStorage")
local remote = rs:WaitForChild("Filter")
remote.OnServerEvent:connect(function(_,player,chat)
local chat= game:GetService("Chat"):FilterStringForBroadcast(chat,player)
print(chat)
print(player)
remote:FireClient(player,chat)
end)
StarterGui
script.Parent.MouseButton1Click:connect(function()
player= game.Players.LocalPlayer
local chat= script.Parent.Parent.NewName.Text
game.ReplicatedStorage.Filter:FireServer(player,chat)
end)
game.ReplicatedStorage.Filter.OnClientEvent:connect(function(player,chat)
print(chat)
script.Parent.Text=chat
end)

3 comments
Why not use the first parameter of OnServerEvent? Someone could just seem like another person and make them say rude stuff.
It's located in startergui. You would need access to their account to be their client. Also, fire server can only be called from the client and only fireclient can be called from the server.
Remove the "" in the remote.OnServerEvent:connect(function(,player,chat) line