Hello developers!
Today I noticed something really weird about Remote Events.
I fired one event to each of 2 people. There were 5 people on the server.
Event was received only by the people who were supposed to get it.
But instead of receiving it once, they received it many times.
Based on brief tests, I conclude that the number of events that player receive is the number of people on the server. I think it’s an engine bug but I’m not sure. Is it somehow possible to avoid this?
Code on the server:
for i,v in pairs(Employees.Maintenance:GetChildren()) do
print("Sent to "..v.Name)
Events.ExecTask:FireClient(Players:FindFirstChild(v.Name), Name, Obj)
end
Code on the client:
Events.ExecTask.OnClientEvent:Connect(function(Name, Obj)
print("Received")
end)