Hello, so I've got a little problem In my game I'm making a feature that makes it so a player can type a string into a textbox and then it will be sent over to a script, but there is one problem that I encountered and that is that I have no way of sending over the string. I know about remote events and stuff but I can't seem to wrap my head around how you are supposed to use the parameters in the remote Event.
Here is an example of what I'm trying to do:
Local Script:
-- Local Script
local RepS = game:GetService("ReplicatedStorage")
-- let's say that the string is already defined and I am going to send it over to the server script
local TheStringIWantToSendOver = "ThisIsTheMessage"
RepS.MyRemoteEvent:FireServer() -- How would I be able to send over the string in line 7 through the Remote Event and for the script to receive the information.
Server Script:
-- Server Script
local RepS = game:GetService("ReplicatedStorage")
RepS.MyRemoteEvent.OnServerEvent:Connect(function()
local MyVariable = "" -- How could my string from the local script end up here?
end)

1 comment
Thank you so much for giving a good example, it worked perfectly!