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

Changing Text property of TextBox in a normal script does not work?

Asked by 6 years ago
Edited 6 years ago

Rookie Question:

Running the following Lua in a normal script results in a TextBox with the text "TextBox" but running it with a localscript results in a TextBox with the text "Please enter text here"

local player = game.Players.GoldAngelInDisguise
local screenGui = Instance.new("ScreenGui", player.PlayerGui)
local textBox = Instance.new("TextBox", screenGui)
textBox.Size = UDim2.new(0, 100, 0, 100)
textBox.Position = UDim2.new(.5, -50, .5, -50)
textBox.Text = "Please enter text here"

I know it would make sense to just use a localscript instead but I want to bypass FE

Btw I am running this on the game Void Script Builder (Place 1) as a test

I have tried researching similar questions but could not find one. Created this account hoping to find an answer. Thanks!

Answered Solution: Adding a wait() before changing the text works! Thanks for the help!

0
Try adding a wait() before setting the text, it works for me Amiaa16 3227 — 6y
0
What do you mean you want to "bypass FE"? You cannot. User#19524 175 — 6y
0
You cannot manipulate anything inside the PlayerGui folder from the server. Any changes in that folder must be made from the client (i.e. through local scripts). MCIronLion 0 — 6y
0
As was already mentioned, either do this via a local script or use remote events DinozCreates 1070 — 6y

Answer this question