What event is used for client to client?

So im trying to make a nuke and when you press the button I sent a remoteEvent from client to client to display (Playername) has enabled nuke! It will drop down in (AmmountOfSeconds) seconds

Here is my script

button.MouseButton1Click:Connect(function()
enableColour:FireServer()
countDownEnable:FireClient(player)
end)

Remote event as
Client to server
Server to all clients

Bindaeevents may work but might be work

There is no such event. You’ll need client -> sever -> client

Easiest done with:
Server

RemoteEvent.OnServerEvent:Connect(function(...)
    RemoteEvent:FireAllClients(...)
end)

Client:

RemoteEvent.OnClientEvent:Connect(function(player, ...)
    --if player == localPlayer then this player is the player that called the event in the first place
end)

RemoteEvent:FireServer(args)

... in lua will basically just remaining arguments as a tuple
Client:


Server:
ysk88_113771
Output:
ggwhz8_113751

2 Likes

BindableEvent/BindableFunction instances are used to facilitate the communication between local scripts (client to client communication).

Communication between local scripts (client to client) can be achieved through the use of BindableInstances (functions and remotes), I’d avoid having a local script fire the server to then have the server fire the client through a different local script (you should just keep everything contained inside the same local script if possible as to negate any potential latency issues).

They want Client->Client, not between scripts. If you want client->client communication, it must go through the server in one way or another. Bindable events and functions only work within the same client or across the server to communicate between scripts. Roblox is not p2p.

When I mentioned between local scripts I was inferring between two local scripts pertaining to a single client, I wasn’t sure whether or not the original poster was trying to achieve this or was trying to achieve communication between two local scripts pertaining to two unique clients.

But how will the other clients listen to the bindableevent? Do we just place it in replicated storage?

No as Steven stated P2P communication in Roblox isn’t possible (one individual client to another), I thought you were asking about how 2 local scripts which pertained to the same script communicated (which is done through the use of BindableEvents).

I’m asking , how will other clients listen to the bindableevent, not how to do it