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

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

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.

8 comments

0

Do not use .Text, .Value in variables.

0

you can, if your using it right

0

^

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.

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.

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.

0

Remote events.

0

The thing is Remotes are way more exploitable ;/

1 answer

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

1 comment

0

This should be a comment.

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