I want to create a TextBox inside a Screengui that I have in the Player's PlayerGui. However, when I run this LocalScript:
Sgui = game.Players.LocalPlayer.PlayerGui.Chat
Txt = Instance.new("TextBox", Sgui)
Noting happens. I had a similar problem to this earlier, and I was advised to use a Script instead of a LocalScript (although I'm not sure why), and it worked. But this time I can't use a normal script because I don't know how to reference the correct Player without using LocalPlayer.
So what is wrong and what do I do?

3 comments
When is this supposed to run? When the game starts?
You need to sent the position and size of the textbox.
This script is disabled and another script un-disables it. I don't need to set the size and position to make it create in the player's GUI.