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!