Not printing TextBox text

Hi the code is supposed to print the text written in the textbox but it is not working.

wait(15)

print(game.StarterGui.ScreenGui.Frame.TextBox.Text)

It is because the UI objects inside game.StarterGui stay unchanged.
When testing the UI will be cloned into game.Players.(your player).PlayerGui.

So instead of referencing the StarterGui’s UI objects you have to take them from your player’s PlayerGui folder instead.

3 Likes

Exactly, so a modified version would be:

-- ensure this is in a local script
task.wait(15)

-- might wanna chunk this into variables, but for a one liner here you go:
print(game.Players.LocalPlayer.PlayerGui.ScreenGui.Frame.TextBox.Text)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.