I’m making a system, and I want players to see the text another player put in the TextBox, however, only the player that put it, sees it.
How can I make it work how I want it to?
I’m making a system, and I want players to see the text another player put in the TextBox, however, only the player that put it, sees it.
How can I make it work how I want it to?
You’ll need to run it through the server with RemoteEvents and make sure you filter it with FilterStringForBroadcast
https://developer.roblox.com/en-us/api-reference/function/Chat/FilterStringForBroadcast
This doesn’t make sense to me. You want other players to see, but you only want the player that types to see. Two contradictory statements.
Can you show me the script as:
-- example
This ?
--First create a RemoteEvent in ReplicatedStorage then:
--Client:
local textBox = ... -- Where your TextBox is
local textButton = ... -- Where your TextButton is
textButton.MouseButton1Click:Connect(function()
game.ReplicatedStorage:WaitForChild("RemoteEvent"):FireServer(textBox.Text)
end)
--Server
game.ReplicatedStorage:WaitForChild("RemoteEvent").OnServerEvent:Connect(function(textBox)
game.ReplicatedStorage:WaitForChild("RemoteEvent"):FireAllClients(textBox)
end)
--Client
game.ReplicatedStorage:WaitForChild("RemoteEvent").OnClientEvent:Connect(function(textBox)
textBox.Text = textBox
end)
But ur Game can be banned if u dont make the FilterStringForBroadcast, that pretend that other can write insults. U can watch Tutorials how to do it.