Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how can i make a server script get the text from a TextBox?

Asked by 3 years ago

im trying to make a team system for my game but i cant even get a server sided script to get text from a TextBox because its client sided (ik it has something to do with remoteEvents but i have no clue how those work in the slightest, all i can get it to do is tell witch player fired the even (and tie functions to it)

1 answer

Log in to vote
1
Answered by 3 years ago

In this case, since your server script needs to ask a client for something and get the result back, you should create a RemoteFunction, invoke it from the server, and handle it on the client.

See this section of the RemoteFunction Wiki page for an example on how to call a RemoteFunction from the server and wait for the client (LocalScript) to finish. Also, in your case, you'll want to return a string from the client (eg. at the end of onCreatePopupRequested).

0
ty steel_apples 58 — 3y
Ad

Answer this question