Can multiple localscripts receive remoteEvent from serverside?

Hello so i am trying to send array to the multiple localscripts but one of the localscripts dont recieve it. can anyone tell me why? and if multiple localscripts cant recieve it. what can i do it?

code where it doesnt recieve

local plr = game.Players.LocalPlayer;
local mouse = plr:GetMouse();
local gui = plr.PlayerGui;
local landTerraformationButton =gui.ScreenGui:WaitForChild("TerraformButton");
local upButton = gui.ScreenGui:WaitForChild("UpTerraform");
local downButton =gui.ScreenGui:WaitForChild("DownTerraform");

local ts = game:GetService("TweenService")
local rs = game:GetService("RunService")

local camera = workspace.CurrentCamera

local truth = true

local part = game.ReplicatedStorage:WaitForChild("LOL");
local scMesh = game.ReplicatedStorage:WaitForChild("SCMesh");
local arr = nil;
local n = nil;

scMesh.OnClientEvent:Connect(function(player, matrix, size)
	print("stage 1-Beta, sending...");
	arr = matrix;
	n = size;

code where it recieves

local scMesh = game.ReplicatedStorage:WaitForChild("SCMesh");
local csMesh = game.ReplicatedStorage:WaitForChild("CSMesh");

scMesh.OnClientEvent:Connect(function(player, arr, n)
	print("stage 1, sending...");
	csMesh:FireServer(player, arr, n);

Your script setups are slightly confusing to me; you’re showing the client receiving the event connection but not how the server receives it

what do u mean by server? both scripts are localscript???

if u are confused by second script, its also sending some information to another normal script.

I can’t figure out why one client isn’t getting an event if I can’t see how the server is sending them; you can’t send information from one client to another, it has to go through the server first

Yes multiple scripts can connect to the same remote event. perhaps the code above the first connection is yielding too much and it connects after the server has sent the remote.

I believe you can only have one .OnClientEvent per remote per client.

You can connect to the same remote multiple times. Don’t know what I did or said to offend you :man_shrugging:

arr = diamondSquare(arr);
print(arr, tester(arr));
arr = flatter(arr, 1, 3);

local mesh = game.ReplicatedStorage:WaitForChild("Mesh")
local scMesh = game.ReplicatedStorage:WaitForChild("SCMesh");

local Players = game:GetService("Players")
local playerList = {};

	playerList = Players:GetPlayers()
	print("sending", playerList[1].ClassName);
	scMesh:FireClient(playerList[1], arr, n);

Then I can only conclude that it’s likely what @bytesleuth mentioned; the remote is probably being fired before the LocalScript can connect to it. So I would recommend doing something like this at the beginning of the script and see what happens:

local scMesh = game.ReplicatedStorage:WaitForChild("SCMesh");

scMesh.OnClientEvent:Connect(function(matrix, size)


You don’t need to pass player to the client’s OnClientEvent signal; the client already has access to the player. The server needs the player so that it knows which client to fire the remote to.

Your signal parameters already look like:

RemoteEvent.OnClientEvent:Connect(arr, n)

By adding player, it looks like:

RemoteEvent.OnClientEvent:Connect(player, arr, n)
 --> The parameter's actual values: (any, any, nil)

TL;DR change the parameters to

scMesh.OnClientEvent:Connect(function(matrix, size)