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

How do I communicate from client to server?

I want a client (a player) to be able to choose a "job" from a selection of multiple "job" choices via a GUI. Upon selection of a "job," the client's chosen "job" may be seen by the server and by other clients. How can this be done? Can this be done via scripts in the GUI or by remote events? Additionally, what signals can remote events send?

1 answer

✓ Accepted answer

You should try to do some research before posting here, but here is a rundown of remote events

On the client, you use the remote event to fire to the server, hence :FireServer. You can pass as many parameters as you want. When you pick up on the server, the first argument is always the player first, which fire server sends automatically. Then, you can pick up whatever you sent.

On the server, you have to fire to the client, along with which client you are firing too. So, you have to :FireClient(player) or it won't work, and the "player" you are sending cannot be nil and has to actually be the player. You can also fire all clients, which is useful for making a server gui, or something like that.

If you want to choose a "job", first you have to choose a job from the client. Then, you send a remote event to change a value or something.

I hope this has been of help :)

2 comments

0

Thank you so much!

0

no problem :)

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