When sent, textbox text won't go along with sent message

Hello! I am trying to make a admin system, that basically sends messages to a server. But for some reason, the text in the textbox wont go along with it. I currently have a RemoteEvent that when the button is clicked, it fires that typical remote event through server.

Localscript:

script.Parent.MouseButton1Click:Connect(function(plr)
	script.Parent.Send:FireServer(plr, script.Parent.Parent.Reason.Text)
end)

Server script:

script.Parent.Send.OnServerEvent:Connect(function(plr)
	local reason = script.Parent.Parent:FindFirstChild("Reason")
	local send = script.Parent
	local url = "nil"
	local webhookService = require(game.ServerStorage.WebhookService)
	
	local userID = plr.UserId
	local username = plr.Name
	webhookService:createEmbed(url, "Staff Backup call by " .. username .. " - " .. userID .."", reason.Text)
		reason.Text = " "
	script.Parent.Parent.Folder.DTailM.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
	task.wait(2)
	game:GetService("TweenService"):Create(script.Parent.Parent.Folder.DTailM, TweenInfo.new(5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {BackgroundColor3 = Color3.fromRGB(255, 0, 0)}):Play()
end)

Order:
Screenshot_240

Lastly, message receival
Screenshot_241
:

script.Parent.Send.OnServerEvent:Connect(function(plr, reason)
	local send = script.Parent
	local url = "nil"
	local webhookService = require(game.ServerStorage.WebhookService)
	
	local userID = plr.UserId
	local username = plr.Name
	webhookService:createEmbed(url, "Staff Backup call by " .. username .. " - " .. userID .."", reason)
		reason = " "
	script.Parent.Parent.Folder.DTailM.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
	task.wait(2)
	game:GetService("TweenService"):Create(script.Parent.Parent.Folder.DTailM, TweenInfo.new(5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {BackgroundColor3 = Color3.fromRGB(255, 0, 0)}):Play()
end)

Possibly due to filtering enabled.

I’m confused as to why you send the player instance and text but don’t have a text parameter on the server’s side?

If your sending the text already through the event why don’t you just use that instead of whatever your doing here.

I’m a bit new to remoteEvents and such,

I went and attempted tweaking it, so here is the code:

script.Parent.Send.OnServerEvent:Connect(function(plr, reason)
	
	local send = script.Parent
	local url = "nil"
	local webhookService = require(game.ServerStorage.WebhookService)
	
	local userID = plr.UserId
	local username = plr.Name
	webhookService:createEmbed(url, "Staff Backup call by " .. username .. " - " .. userID .."", reason)
		reason = " "
	script.Parent.Parent.Folder.DTailM.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
	task.wait(2)
	game:GetService("TweenService"):Create(script.Parent.Parent.Folder.DTailM, TweenInfo.new(5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out, 0, false, 0), {BackgroundColor3 = Color3.fromRGB(255, 0, 0)}):Play()
end)

(it doesn’t include the reason [textbox] in the message tho.)

Add print(reason) at the top of the code, you should be receiving the textbox’s text.

whene you do send fire event it send the player who fires it first

script.Parent.Send.OnServerEvent:Connect(function(me,plr, reason)

I already have that
(plr)

30charbypass

Attempted that, problem still persists.

Update: I finally figured it out.

The problem was I was calling in the “plr” event when using :FireServer(), and then I realized that the “plr” event passes in automatically. So I removed the “plr” in :FireServer(), and apparently, it now works.

Thank you for those who tried helping :smiley: