Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I fix this GUI?

So I recently just made a gui for fun, and I made this script (this is also my first GUI ive ever made so..)

function fade()
		wait(1)
		local ScreenGui =Instance.new("ScreenGui",game.StarterGui)
	    local Frame = Instance.new("Frame",game.StarterGui.ScreenGui)
	    Frame.Size = UDim2.new{0, 800,0, 525}
		local TxtBox = Instance.new("TextBox",game.StarterGui.ScreenGui.Frame)
		TxtBox.BackgroundColor3 =Color3.new(255, 255, 255) 
		TxtBox.BorderColor3 = Color3.new(27, 42, 53)
		TxtBox.Position = UDim2.new{0, 30,0, 200}
		TxtBox.Size = UDim2.new{0, 200,0, 50}
		TxtBox.Font = "SourceSansBold"
		TxtBox.FontSize = "Size42"
		TxtBox.TextColor3 =Color3.new(129, 202, 253)
		local Quan = Instance.new("ImageLabel",game.StarterGui.ScreenGui.Frame)
		Quan.BackgroundColor3 = Color3.new(255, 255, 255)
		Quan.BorderColor3 =Color3.new(27, 42, 53)
		Quan.Position = UDim2.new{0, 250,0, 300}
		Quan.Size = UDim2.new{0, 100,0, 100}
		Quan.Name = "Quan"
		Quan.Image = "rbxgameasset://Images/quan"
		Quan.ImageColor3 =Color3.new(255, 255, 255)
		local LilC = Instance.new("ImageLabel",game.StarterGui.ScreenGui.Frame)
		LilC.Name = "LilC"
		LilC.BackgroundColor3 = Color3.new(255, 255, 255)
		LilC.BorderColor3 = Color3.new(27, 42, 53)
		LilC.Position = UDim2.new{0, 350,0, 300}
		LilC.Size = UDim2.new{0, 100,0, 100}
		LilC.Image = "rbxgameasset://Images/MLG profile picture"
		LilC.ImageColor3 =Color3.new(255, 255, 255)
		local Brendan = Instance.new("ImageLabel",game.StarterGui.ScreenGui.Frame)
		Brendan.Name = "Brendan"
		Brendan.BackgroundColor3 =Color3.new(255, 255, 255)
		Brendan.BorderColor3 =Color3.new(27, 42, 53)
		Brendan.Position = UDim2.new{0, 450,0, 300}
		Brendan.Size = UDim2.new{0, 100,0, 100}
		Brendan.Image = "rbxgameasset://Images/brendan"
		Brendan.ImageColor3 =Color3.new(255, 255, 255)
		wait(10)
	end
fade()

So why isnt the GUI showing :I

1 answer

✓ Accepted answer

UDim2 doesn't take a table

Your UDim2.new{a,b,c,d} needs to become UDIm2.new(a,b,c,d), because it needs a tuple rather than an array.


Color3 uses floats

Your Color3.new(r,g,b) needs to have its values divided by 255. You'll want to do Color3.new(r/255,g/255,b/255)

This discussion is preserved as it was. New answers, comments, and votes are closed.