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

The TextBox's content won't go in the value. Why?

So I'm working on some sort of cross-server chat and would like the text to first be put in a value before getting filtered and sent. Unfortunately, the value is still empty. I have a feeling that this has to do with FE but I'm not sure. Thank you.

Script:

script.Parent.MouseButton1Click(function()
	game.Lighting.Value.Value = script.Parent.Parent.TextBox.Text
end)

2 answers

✓ Accepted answer

You are correct that this is FE related. Most changes the client makes to everything in 'game' are simply ignored by the server (notable exceptions include the player's own character). To fix this, you need to use RemoteEvents to send the value to the server (the server can then do whatever it wants with this information).

The Value is still in its number format. Just change it using this "tostring(your value)". Also, you have it turned the wrong way around. I'm guessing you want the value to be displayed on the textbox, correct? Change the line of script to this.

script.Parent.Parent.TextBox.Text = tostring(game.Lighting.Value.Value)

2 comments

0

Lol just realized I answered your question wrong lol. Exchange your Value with a stringvalue. then your script will work

0

It's already a stringvalue

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