2 different textbox print the same thing in database

Hello! I try to make a system where the player can choose his name. The text in the textbox is send to the database, but the first name, and the name, print the same text. I dont know why, i have 2 remoteEvent with different name, and all the variables in the fonction are different. Can you help me ?

local textBoxInput = ""

local RemoteEvent = game:GetService("ReplicatedStorage").RemoteEvents.Prenom

local TextBox2 = script.Parent

TextBox2.FocusLost:Connect(function()

RemoteEvent:FireServer(TextBox2.Text)

end)

local textBoxInput = ""

local RemoteEvent = game:GetService("ReplicatedStorage").RemoteEvents.Nom

local TextBox = script.Parent

TextBox.FocusLost:Connect(function()

RemoteEvent:FireServer(TextBox.Text)

end)

local RemoteEvent = game:GetService("ReplicatedStorage").RemoteEvents.Nom

RemoteEvent.OnServerEvent:Connect(function(player, text)

local TextBoxVariable = text

print(TextBoxVariable)

end)

local RemoteEvent3 = game:GetService("ReplicatedStorage").RemoteEvents.Prenom

RemoteEvent.OnServerEvent:Connect(function(player, text1)

local TextBoxVariable2 = text1

print(TextBoxVariable2)

end)

Both OnServerEvents are connected to the same remoteevent, one of them should be for RemoteEvent3

1 Like

thank you !! thats it ( 30 chaar )

1 Like

Anytime! if you have anymore issues don’t be afraid to maek another post!