I’m not a pro.
I have trouble getting the Textbox inputed text by the player to be sent to the server. It keeps printing nothing but on the client side it prints the text inside the Textbox.
CLIENT SCRIPT
local SignUpFrame = workspace.Monitor.Other.Screen.SurfaceGui.Main.LogInSignUp
local SignUpButton = SignUpFrame.Frame.SignUp
local Username = SignUpFrame.Frame.UserInput
local Password = SignUpFrame.Frame.PassInput
-----------------------------
local Credsend = game.ReplicatedStorage:WaitForChild("CREDSend")
local WarnThem = game.ReplicatedStorage:WaitForChild("Warning")
SignUpButton.MouseButton1Click:Connect(function()
local Warn = SignUpFrame.Frame.Warn
if #Username.Text > 0 and #Password.Text > 0 then
print(Username.Text) -- Prints the text inside Textbox
print(Password.Text) -- Same here
Credsend:FireServer(Username, Password) --IDK if its correct but its supposed to send it to the server
elseif #Username.Text < 1 or #Password.Text < 1 then -- if textbox is less 1 character lenght then warn player
print("statment 2")
WarnThem:FireServer()
end
end)
SERVER SCRIPT
local Warning = Parent.Warn
local Replicated = game.ReplicatedStorage
Replicated.CREDSend.OnServerEvent:Connect(function(Player, Username, Password)
print(Player) -- Does print player
print(Username.Text) -- Does not print the Textbox input by the client
print(Password.Text) -- Same here
end)
Replicated.Warning.OnServerEvent:Connect(function()
Warning.Visible = true
wait(5)
Warning.Visible = false
end)