KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 11 Sep 2014 12:00 PM |
I want to access the another client's playerGui from a client. I can't access it from a server. I have little experience with remotes ,anyone know how to return the other client's Player.PlayerGui once the PlayerAdded event has been trigger from current client > Server >Other Clients. |
|
|
| Report Abuse |
|
|
|
| 11 Sep 2014 12:04 PM |
Why do you need one client to access another client's data? If you need the data across multiple clients, the information should be stored on the server. |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 11 Sep 2014 01:26 PM |
| The Playergui is stored on the current client can not be accessed by other clients and can not be accessed by the server. |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|
|
| 11 Sep 2014 03:11 PM |
I'll ask again.
Why do you need one client to access another client's data? |
|
|
| Report Abuse |
|
|
iiEssence
|
  |
| Joined: 18 Jun 2014 |
| Total Posts: 3467 |
|
|
| 11 Sep 2014 03:12 PM |
| Set FilteringEnabled to false |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 11 Sep 2014 03:22 PM |
@AgentFireFox It's for a chatgui using a textbox as the chat bar rather than using the Chatted event
@iiEssence I did and my script still won't work
Server Script: game.Players.PlayerAdded:connect(function(plr) if plr then return plr end game.ReplicatedStorage.Remotes.PlayerAdded:InvokeClient(plr) end)
local players = {}
function game.ReplicatedStorage.Remotes.PlayerAdded.OnClientInvoke(x) table.insert(players, x) end |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|
|
| 12 Sep 2014 06:05 AM |
| You could fire it to the server, which fires it to the players client, which then fires it back to the server, and back to the original player.. |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 12 Sep 2014 07:59 AM |
| @EpicBreaker It would be better if I fired it from the Client to the server then back to all clients including the caller. |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2014 09:00 AM |
| Then every client would get the info, don't you want a certain user to get the info? |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2014 09:42 AM |
This = {}
game.Players.ChildAdded:connect(function(x) if x:IsA("Player")then table.insert(This,x) end end) |
|
|
| Report Abuse |
|
|
|
| 12 Sep 2014 09:43 AM |
or do this if u want to fix ur script xd
game.Players.PlayerAdded:connect(function(plr) game.ReplicatedStorage.Remotes.PlayerAdded:InvokeClient(plr) end) |
|
|
| Report Abuse |
|
|
FoLBot
|
  |
| Joined: 08 May 2014 |
| Total Posts: 168 |
|
|
| 12 Sep 2014 09:58 AM |
Use Bindable Events and use the :Fire() function to fire and the Event for the event call.
Like this:
A script:
event = game.Workspace.BindableEvent --BindableEvent in Workspace
event:Fire("Agru #1", true, 5)
Another script:
event = game.Workspace.BindableEvent
event.Event:connect(function(arg1, arg2, arg3) code end) |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 12 Sep 2014 10:16 AM |
What's the difference between bindable functions and remote functions/events?
|
|
|
| Report Abuse |
|
|
|
| 13 Sep 2014 10:22 AM |
I thought I replied telling you to take a look at my Custom Chat UI.
A Bindable is for like-side operation (server to server, client to client). A Remote is for cross-side operation (server to client, client to server). |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
|
| 13 Sep 2014 10:29 AM |
| Is there a method to fire it to all clients? |
|
|
| Report Abuse |
|
|
|
| 13 Sep 2014 10:40 AM |
With a RemoteEvent there is a method FireAllClients.
Take a look at my Custom Chat UI. |
|
|
| Report Abuse |
|
|
KOzero
|
  |
| Joined: 11 May 2010 |
| Total Posts: 1411 |
|
| |
|