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

Why wont script change string value to my gui text?

Asked by 4 years ago
Edited 4 years ago

Why does this not work?

    game.Workspace.CarPrice.Value = game.Players.YurStillABustaToMe.PlayerGui.CarPrice.TextBox.Text
0
the while script.Disabled == false do is useless since the script wont run if it's disabled brokenVectors 525 — 4y
0
I know TheExtraDip 19 — 4y
0
Im trying to figure out why line 3 doesn't work TheExtraDip 19 — 4y

4 answers

Log in to vote
0
Answered by 4 years ago

It won't work because of Filtering Enabled. When you change the text of a TextBox, it doesn't show for the server.

Ad
Log in to vote
0
Answered by 4 years ago

Instead of inserting it into the Player's PlayerGui, you can just make a script in StarterGui.

0
Tried that also, doesn't work TheExtraDip 19 — 4y
Log in to vote
0
Answered by 4 years ago

Does a part have that script? Or is it not attached to a part?

0
Its in ServerScriptService TheExtraDip 19 — 4y
0
... Prime_Jayden 11 — 4y
0
Is it supposed to be shown on a part? Prime_Jayden 11 — 4y
0
No TheExtraDip 19 — 4y
Log in to vote
0
Answered by 4 years ago
Edited 4 years ago
local t = game.Players.YurStillABustaToMe.PlayerGui:FindFirstChild("CarPrice")
local val = game.Workspace:FindFirstChild("CarPrice")
print(t,val)
while true do
wait()

if val and t then
val.Value = t.Text
end

end
0
No errors. Doesn't work. I'm so confused. TheExtraDip 19 — 4y
0
@mantorok4866 It prints nothing TheExtraDip 19 — 4y
0
15:44:51.297 - YurStillABustaToMe is not a valid member of Players TheExtraDip 19 — 4y
0
Don't spoonfeed like this please. Give an explanation as to what you're doing and how you figured it out. brokenVectors 525 — 4y

Answer this question