Text not firing?

Hello! I am trying to make it so that text from a textbox gets sent to the server.
The script is:

local TextString = tostring(script.Parent.Parent.TextBox.Text)
print(TextString)
game.ReplicatedStorage.TextFire:FireServer(TextString)

On the server side all it prints out is “Text” while on the client side it prints out what I typed.

Can you show the server script?

1 Like
game.ReplicatedStorage.TextFire.OnServerEvent:Connect(function(Text)
    print(Text)
end)

I realized that text was in quotes so I fixed that but now it says my username instead.

The first parameter is the player who fired the remote event. So put the text in the second parameter.

1 Like

Change the function params to (player, Text)
RemoteEvent.OnServerEvent passes the player who fired it as the first parameter and any other parameters you fired after.

1 Like