Sending 2 parameters to RemoteEvent, but server gets 2 of the same thing

Hello, I am trying to send 2 things to a RemoteEvent for a game I am trying to make. However, the server receives 2 of the same thing. How can I fix that?

Local script:

local sp = script.Parent
local remEvent = game.ReplicatedStorage.RemoteEvent
local c = 0
sp.MouseButton1Click:Connect(function()
	local plr = game.Players.LocalPlayer
	local t1 = sp.Parent.TextBox1.Text
	local t2 = sp.Parent.TextBox2.Text
	print(t1,t2) -- Test1 Test2
	c = c + 1 -- times button used
	remEvent:FireServer(u,p)
end)

Server Script (in ServerScriptService)

 -- Simplified version 
local remEvent = game.ReplicatedStorage.RemoteEvent
remEvent.OnServerEvent:Connect(function(t1,t2)
	print(t1,t2) -- Test1 Test1
	
end)

Any help would be great. Thanks!

1 Like

The first argument of OnServerEvent is automatically the player in which the client fired. So you do not need to FireServer the player object.

1 Like

Thank you. I forgot about that

1 Like