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

TextBox.Text doesn't replicate to the server. How do I fix this?

Asked by 5 years ago

Hello!

I've made a simple GUI that has a TextBox and a Button.

The server makes the TextBox + TextButton with Instance.new, etc.

The default value of my TextBox is Enter your text here.

If the client changes the text in the TextBox (not problematically) it only changes on the client. So if I try to acess the TextBox's text with (on the server):

local MyText = TextBox.Text

MyText becomes the same as Enter your text here.

Any help would be appreciated.

I'd like to avoid using RemoteEvents/RemoteFunctions if possible.

Side note: I think this may be a Roblox bug since it was working fine a few days ago. :/

Thanks,

OMG.

0
Do not use .Text, .Value in variables. yHasteeD 1819 — 5y
0
you can, if your using it right User#23365 30 — 5y
0
^ User#25115 0 — 5y
0
However, it is likely he is using it incorrectly. Also, all client sided stuff should be done on the client. If you need the text from the client, use a remote event. User#25115 0 — 5y
View all comments (4 more)
0
The server should never be messing with or checking the client's GUIs. Only do those kinds of things on the client. Remote events were created for a reason after all. User#25115 0 — 5y
0
^ It's impossible to avoid remotevents as it is the general standard in game design. The client cannot update the server and vice versa. It's the main reason Roblox now forces FE as it makes games safer and more reliable. turtle2004 167 — 5y
0
Remote events. LoganboyInCO 150 — 5y
0
The thing is Remotes are way more exploitable ;/ OMG_Gaming404 73 — 5y

1 answer

Log in to vote
-1
Answered by
Kullaske 111
5 years ago
Edited 5 years ago

For something to replicate onto the server, it needs to be sent via a RemoteEvent or RemoteFunction.

You can read how to use them here

0
This should be a comment. OMG_Gaming404 73 — 5y
Ad

Answer this question