|
| 02 Jun 2014 10:36 PM |
I am trying to display a Textbox with text in it and afterwards it changes what it says. So far it doesn't even show a TextBox. Fix it or tell me I am doing it completely wrong? I'm still a newbie at Lua.
while true do lk = Instance.new("ScreenGUI") lk.Parent = Game.StarterGui Lkm = Instance.new("TextBox") Lkm.Parent = Game.StartGui.lk Lkm.BackgroundColor3 = 46, 255, 0 Lkm.BackgroundTransparency = .3 Lkm.BorderSizePixel = 3 Lkm.Position = {0.05, 0},{0.025, 0} Lkm.Size = {0, 310},{0, 30} wait(1) Lkm.Text = "X" wait(5) Lkm.Text = "Y" wait(5) Lkm.Text = "Z" end
|
|
|
| Report Abuse |
|
|
|
| 02 Jun 2014 10:39 PM |
GUI Size and Position are measured in UDim2
Lkm.Position = UDim2.new(0.05, 0, 0.025, 0) Lkm.Size = UDim2.new(0., 310, 0, 30) |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2014 11:23 PM |
| I fixed that part but I still see no Gui in-game. Anyone else see anything? |
|
|
| Report Abuse |
|
|
|
| 02 Jun 2014 11:36 PM |
| I am thinking that it is because ScreenGui is not a valid instance, so, instead of Instance.new("ScreenGUI") is there anything I can replace it with to make it work? |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2014 12:07 AM |
| Oh, then it was spelled wrong. I think it goes Instance.new("ScreenGui") instead of "ScreenGUI" |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2014 01:27 AM |
| Nticed a bunch of things wrong, fixed most of them, I think this the the last problem, how do you set the background color of the textbox? On output it just says, "Workspace.Script:6: bad argument #3 to 'BackgroundColor3' (Color3 expected, got number)" |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2014 01:55 AM |
| If you're doing it right and putting 3 numbers, you must be putting an invalid number for a color3 I guess |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2014 04:19 AM |
here
lk = Instance.new("ScreenGui") lk.Parent = Game.StarterGui Lkm = Instance.new("TextBox") Lkm.Parent = lk Lkm.BackgroundColor3 = Color3.new(46/255, 255/255, 0/255) Lkm.BackgroundTransparency = .3 Lkm.BorderSizePixel = 3 Lkm.Position = UDim2.new(0.05, 0, 0.025, 0) Lkm.Size = UDim2.new(0, 310, 0, 30) wait(1) Lkm.Text = "X" wait(5) Lkm.Text = "Y" wait(5) Lkm.Text = "Z" |
|
|
| Report Abuse |
|
|
|
| 03 Jun 2014 06:07 AM |
You could do it like Stealth said, or Lkm.BackgroundColor3 = BrickColor.new("Bright red").Color |
|
|
| Report Abuse |
|
|