Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I access a client from another client?

Lets say for an ingame chatting service. How would I sent the chats from a PlayerGui to another, and vice versa? I tried using BindableFunctions but I dont know how to use them.

1 answer

✓ Accepted answer

Use a RemoteEvent,

Client Script:

Event.OnClientEvent:connect(function(Text)
	--You have your text (as will everyone else)
end)

local Text = "Testing..1..2..3"

Event:FireServer(Text)

Server Script:

Event.OnServerEvent:connect(function(Player, Text)
	Event:FireAllClients(Text)
end)

2 comments

0

Ah great. Thanks. And would there be another way of doing it using RemoteFunctions?

0

It would work (pretty much) the same way as a remoteevent, although personally I prefer RemoteEvents.

This discussion is preserved as it was. New answers, comments, and votes are closed.