So, I have been working on a game that involves a TextBox and a TextButton. What I want to happen is, when a player types in the TextBox, then clicks the Confirm Button, it will send the Text in the TextBox to the Server using RemoteEvents.
Then, a Server Script will make a new StringValue that has the TexBox's Text as its Value.
I have tried testing it out, and every time I do, it makes the StringValue's Value Blank on the Client and Server.
(The RemoteEvent name is called "NewStringEvent")
Here is the LocalScript for the Confirm Button:
local TextBox = script.Parent.Parent.TextBox.Text
local RemoteEvent = game:GetService("ReplicatedStorage"):WaitForChild("NewStringEvent")
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
script.Parent.Parent.Parent.SuccessFrame.Visible = true
RemoteEvent:FireServer(TextBox)
end)
Here is the Server Script for the RemoteEvent:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local NewStringEvent = ReplicatedStorage.NewStringEvent
local counter = 0
NewStringEvent.OnServerEvent:Connect(function(player, TextBox)
counter += 1
local newString = Instance.new("StringValue")
newString.Name = player.Name .. "s_" .. counter .. "_Text"
newString.Value = TextBox
newString.Parent = ReplicatedStorage:WaitForChild(player.Name .. "s_Texts")
end)
Any Help On This?

1 comment
Thank you so much! It works.