Hello, I was trying to code a Textbox being inserted, sized, and moved using a script. It gets inserted into the LocalPlayer just fine, but the position and size won't change. I am fairly new to lua, so I am not too sure if I used my UDim2 correctly (I believe it's the error)
Also, I don't get any errors in the script output.
local gui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui) local box = Instance.new("TextBox",game.Players.LocalPlayer.PlayerGui.ScreenGui) box.Position = UDim2.new{0, 100},{0, 100} box.Size = UDim2.new{0, 100},{0, 100} box.Text = "Test"
http://wiki.roblox.com/index.php?title=UDim2
First, in line 2 you should use the gui variable you already defined. Then, UDim2 arguments should be given like any other function. {0,0},{0,0} is a display style.
local gui = Instance.new("ScreenGui",game.Players.LocalPlayer.PlayerGui) local box = Instance.new("TextBox",gui) box.Position = UDim2.new(0, 100,0, 100) box.Size = UDim2.new(0, 100,0, 100) box.Text = "Test"