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

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

Asked by 5 years ago

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

Log in to vote
0
Answered by 5 years ago

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).

Ad
Log in to vote
0
Answered by 5 years ago

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)
0
Lol just realized I answered your question wrong lol. Exchange your Value with a stringvalue. then your script will work elitekiller2342 87 — 5y
0
It's already a stringvalue eloiishot 47 — 5y

Answer this question