Direct client to client communication

Hello, i would like to know if it is possible to send information from one client to another whitout having to call the server?

If it is not possible then, i would like to know how could you optimize the clientserverclient process(normal client to client system).

Thanks for all answers.

InvokeClient is what you’re looking for!

You could make it so that there is one server remoteevent that dispatches other events.

i.e.

ReplicatedStorage → DispatchClient

event.OnServerInvoke:Connect(function(playerFrom, playerTo, event, ...)
    event:FireClient(playerTo, ...)
end)

If i understand right, this require a call to the server in order to work? If yes then do you have a solution which dont involve the server?

I’m not aware of any. Also, if the server just automatically gave away direct connections between players (which would probably involve giving the IPs) it sounds like a huge security risk.

1 Like

The server is kind of the hub for all client actions. Here’s an example:

Computer = Client
Amazon = Host
Product = Client

The computer client clicks on the product, and the host handles the click by putting them on the product’s page.

1 Like

Just to put a context, i will have a main account connect to alt account devices to be able to have more motion sensor than normaly to be able to track addition motion. With the classic technique the motion will be tracked only maximum 20 times per second with is not a lot but with 40 it will work as expected. That the reason why i’m searching for an alternative of the base technique. But as i said in the post, can you optimize the base technique?

I don’t think it’s possible (with an unmodified roblox installation) unfortunately. For security reasons, every communication to the outside has been put behind the proxy of a server, for one, to protect users from getting their IP stolen, or worse for 1:1 exploits to hack players.

1 Like

I’ve maybe got something with module scripts and i have a question relating to it. If i make a module and inside i store the value that are supposed to be communicated with the other client will i be able to acess them for the local script?

I decided to do everything on the server so the information get sent from the client directly to the server which remove the need to replicate so i will be able to run it 40 time per second hooray!