Textbox does not return the things written in them

I’m trying to make a application centre where the application submitter would fill out a 3 question quiz and the answers on the quiz would be sent in a embed on a discord server for server admins to review… And uh… The textboxes don’t show the answers…

I’ll gladly give you acess to the game via team create… If you can help me please contact me on discord: VladPhonkie#3662

Message with just questions and no answers even though answers were given
How it looks from in-game
ADDITIONAL PHOTOS:

CODE

	plr.PlayerGui.ApplicationGUI.Frame.Question1.Text = "QUESTION ONE \n".. Q1
	plr.PlayerGui.ApplicationGUI.Frame.Question2.Text = "QUESTION TWO \n"..Q2
	plr.PlayerGui.ApplicationGUI.Frame.Question3.Text = "QUESTION THREE \n"..Q3
	
end


local question_1 = "What do you think it's the duty of a Staff Assistant?"
local question_2 = "Who do you contact if you see a higher rank abusing?"
local question_3 = "Why should we hire you over other candidates?"


game.Players.PlayerAdded:Connect(function(player)
	
	local q1 = Instance.new("StringValue")
	local q2 = Instance.new("StringValue")
	local q3 = Instance.new("StringValue")
	
	
	local stage1 = false
	local stage2 = false
	
	q1.Parent = player
	q1.Name = "Q1"
	
	q2.Parent = player
	q2.Name = "Q2"
	
	q3.Parent = player
	q3.Name = "Q3"
	
	wait(7)

	
	player.PlayerGui.ApplicationGUI.Frame.LoadingLabel.Visible = false
	player.PlayerGui.ApplicationGUI.Frame.Button.Visible = true
	
	
	
	player.PlayerGui.ApplicationGUI.Frame.Button.MouseButton1Click:Connect(function()
		if stage1 == false then
		stage1 = true
		player.PlayerGui.ApplicationGUI.Frame.Q1A.Visible = true
		player.PlayerGui.ApplicationGUI.Frame.Q2A.Visible = true
		player.PlayerGui.ApplicationGUI.Frame.Q3A.Visible = true
		
		player.PlayerGui.ApplicationGUI.Frame.Question1.Visible = true
		player.PlayerGui.ApplicationGUI.Frame.Question2.Visible = true
		player.PlayerGui.ApplicationGUI.Frame.Question3.Visible = true
		Quiz(
			player, 
			question_1, 
			question_2,
			question_3
			)
			
			
		elseif stage2 == false then
			stage2 = true
			player.PlayerGui.ApplicationGUI.Frame.Q1A.Visible = false
			player.PlayerGui.ApplicationGUI.Frame.Q2A.Visible = false
			player.PlayerGui.ApplicationGUI.Frame.Q3A.Visible = false
			
			q1.Value = player.PlayerGui.ApplicationGUI.Frame.Question1.Text
			q2.Value = player.PlayerGui.ApplicationGUI.Frame.Question2.Text
			q3.Value = player.PlayerGui.ApplicationGUI.Frame.Question3.Text

			player.PlayerGui.ApplicationGUI.Frame.Question1.Visible = false
			player.PlayerGui.ApplicationGUI.Frame.Question2.Visible = false
			player.PlayerGui.ApplicationGUI.Frame.Question3.Visible = false
			player.PlayerGui.ApplicationGUI.Frame.Button.Visible = false
			wait(2)
			
			player.PlayerGui.ApplicationGUI.Frame.Question2.Text = "Posting application..."
			player.PlayerGui.ApplicationGUI.Frame.Question2.Visible = true
			
			local https = game:GetService('HttpService')
			
			
			
			
			
			
			
			
			
			
			local  answer1 = player.PlayerGui.ApplicationGUI.Frame.Q1A.Text
			local  answer2 = player.PlayerGui.ApplicationGUI.Frame.Q2A.Text
			local  answer3 = player.PlayerGui.ApplicationGUI.Frame.Q3A.Text
			
			
			
			local HttpService = game:GetService("HttpService")
			local URL = "DISCORD WEBHOOK HERE"

			local Data = {
				["content"] = "",
				["embeds"] = {{
					["title"] = player.Name.. "'s application", -- title of the embed
					["description"] = question_1.. "\n".. answer1.. "\n\n".. question_2.. "\n".. answer2.. "\n\n".. question_3.. "\n".. answer3, -- description
					["type"] = "rich",
					["color"] = tonumber(0xffffff), -- This is the color of the side slot of the embed message. It is in HEX format. You will need to look up an online converter to get the desired color you'd like
					["fields"] = {
						{
							["name"] = "Player ID",
							["value"] = player.UserId,
							["inline"] = true
						},
						{
							["name"] = "Player's account age",
							["value"] = player.AccountAge.. " days.",
							["inline"] = true
						}
					}
				}}
			}

			local EncodedData = HttpService:JSONEncode(Data) -- In order for Discord to read your data properly, you need to convert your data to JSON format. Luckily, this is easy with HttpService:JSONEncode()
			HttpService:PostAsync(URL, EncodedData) -- This final statement is our HTTP call to Discord. We're sending our data over for Discord to display the message.
			
			
		end
	end)
end)```

It appears that you are trying to use a server script to accomplish your quiz. You can do this, but you will need to do some edits.

Here’s how the workflow should be:

  • Player joins game and is asked questions and then responds to them accordingly.
  • The player should then press a submit, or similar button
  • The button will have code in a local script which sends a remote to the server containing their answers.
  • The server will receive the remote, and then send a request to your API.

If you are new to remote events and functions, you can read the documentation here: Remote Events and Functions | Roblox Creator Documentation

Heyo! I’ve just done a local script, mind telling me if this’ll do?



script.Parent.MouseButton1Click:Connect(function()
	
	
	local q1= script.Parent.Parent.Q1A
	local q2= script.Parent.Parent.Q2A
	local q3= script.Parent.Parent.Q3A
		
	RemEvent:FireServer(q1, q2, q3)
end)```

Script.Parent is the button)

Yes, that looks about right on the client. Don’t forget to get the .Text property of the text boxes, otherwise the server will receive nil, due to the UI being on the client. Example: local q1= script.Parent.Parent.Q1A.Text

Let me know how you make out.

Thank you a lot! You deserve a crown. :crown:

Tried on doing this. Still shows nothing…

local stage2 = false

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local function Quiz(plr, Q1, Q2, Q3)
	plr.PlayerGui.ApplicationGUI.Frame.Question1.Text = "QUESTION ONE \n".. Q1
	plr.PlayerGui.ApplicationGUI.Frame.Question2.Text = "QUESTION TWO \n"..Q2
	plr.PlayerGui.ApplicationGUI.Frame.Question3.Text = "QUESTION THREE \n"..Q3
	
end


local question_1 = "What do you think it's the duty of a Staff Assistant?"
local question_2 = "Who do you contact if you see a higher rank abusing?"
local question_3 = "Why should we hire you over other candidates?"


game.Players.PlayerAdded:Connect(function(player)
	
	local q1 = Instance.new("StringValue")
	local q2 = Instance.new("StringValue")
	local q3 = Instance.new("StringValue")
	
	
	local stage1 = false
	local stage2 = false
	
	q1.Parent = player
	q1.Name = "Q1"
	
	q2.Parent = player
	q2.Name = "Q2"
	
	q3.Parent = player
	q3.Name = "Q3"
	


	
	player.PlayerGui:WaitForChild("ApplicationGUI"):WaitForChild("Frame").LoadingLabel.Visible = false
	player.PlayerGui.ApplicationGUI.Frame.Button.Visible = true
	
	
	
	player.PlayerGui.ApplicationGUI.Frame.Button.MouseButton1Click:Connect(function()
		if stage1 == false then
		stage1 = true
		player.PlayerGui.ApplicationGUI.Frame.Q1A.Visible = true
		player.PlayerGui.ApplicationGUI.Frame.Q2A.Visible = true
		player.PlayerGui.ApplicationGUI.Frame.Q3A.Visible = true
		
		player.PlayerGui.ApplicationGUI.Frame.Question1.Visible = true
		player.PlayerGui.ApplicationGUI.Frame.Question2.Visible = true
		player.PlayerGui.ApplicationGUI.Frame.Question3.Visible = true
			player.PlayerGui.ApplicationGUI.Frame.Button.Visible = false
			player.PlayerGui.ApplicationGUI.Frame.Button2.Visible = true
			player.PlayerGui.ApplicationGUI.Frame.Button.Active = false
			
		Quiz(
			player, 
			question_1, 
			question_2,
			question_3
			)
			
		
			
	  end
   end)
end)
ReplicatedStorage:WaitForChild("Answers").OnServerEvent:Connect(function(player, qa1, qa2, qa3)
	
	
		player.PlayerGui.ApplicationGUI.Frame.Q1A.Visible = false
		player.PlayerGui.ApplicationGUI.Frame.Q2A.Visible = false
		player.PlayerGui.ApplicationGUI.Frame.Q3A.Visible = false

		player.PlayerGui.ApplicationGUI.Frame.Question1.Visible = false
		player.PlayerGui.ApplicationGUI.Frame.Question2.Visible = false
		player.PlayerGui.ApplicationGUI.Frame.Question3.Visible = false
		player.PlayerGui.ApplicationGUI.Frame.Button.Visible = false
		wait(2)

		player.PlayerGui.ApplicationGUI.Frame.Question2.Text = "Posting application..."
		player.PlayerGui.ApplicationGUI.Frame.Question2.Visible = true

		local https = game:GetService('HttpService')
		-- https://discord.com/api/webhooks/1033416708133748757/DuZ2mVTN_H-8JtWUUYCTQyT_yfXDxe86TuGonXP1d3FY3leCAVMUvi_wpXK_CLCS31N-









		local  answer1 = player.PlayerGui.ApplicationGUI.Frame.Q1A.Text
		local  answer2 = player.PlayerGui.ApplicationGUI.Frame.Q2A.Text
		local  answer3 = player.PlayerGui.ApplicationGUI.Frame.Q3A.Text


	local URL = "h"

	local Data = { 
		["content"] = "",
		["embeds"] = {{
			["title"] = player.Name.. "'s application", -- title of the embed
			["description"] = question_1.. "\n".. answer1.. "\n\n".. question_2.. "\n".. answer2.. "\n\n".. question_3.. "\n".. answer3, -- description
			["type"] = "rich",
			["color"] = tonumber(0xffffff), -- This is the color of the side slot of the embed message. It is in HEX format. You will need to look up an online converter to get the desired color you'd like
			["fields"] = {
				{
					["name"] = "Player ID",
					["value"] = player.UserId,
					["inline"] = true
				},
				{
					["name"] = "Player's account age",
					["value"] = player.AccountAge.. " days.",
					["inline"] = true
				}
			}
		}}
	}

	local HttpService = game:GetService('HttpService')
	local EncodedData = HttpService:JSONEncode(Data) -- In order for Discord to read your data properly, you need to convert your data to JSON format. Luckily, this is easy with HttpService:JSONEncode()
	
	local success, err = pcall(function()
		HttpService:PostAsync(URL, EncodedData) -- This final statement is our HTTP call to Discord. We're sending our data over for Discord to display the message.
	end)
	if sucess then
		player:Kick()
	end	


		
end)

I think you are missing the point here. You cannot directly access the client through the server. The server should only contain the remote function code for sending the API request, and the client should tell the server the answers to the questions.

To put it simply, you need to move all code relating to the player’s UI into the local script. The server should only send the API request. Everything UI related should be handled on the client.

I did understand the point, turns out I forgot about the client script on the text button, I’ve fixed it and it works perfectly fine. Sorry for the double trouble. :sweat_smile: