2017-07-30 3 views
0

私の質問を見てくれてありがとう、私はあなたが私が探している寝椅子を持って来ることを願っています。私はさまざまな方法を試みました。たぶん私はそれを見過ごした。私は、これは私の質問は、私は閉じ、この基本的なtextbuttonをしたいオーケー... あるGUIでこれを取得するには?

LUAのオフに走るゲームROBLOXのためである

事前に任意の入力をありがとう

...など作るGUIに新しいですGUIが開いていない。 誰かが私を助けてくれるかもしれないと私は理解できないでしょうか? 私は新しいフレームを作り、それを私が望むところに置き、テキストボタンを置いてはいけないと思った。私はより多くの方法を試してみましたが、何も働いていませ

-- Objects 
local VanScreenGui = Instance.new("ScreenGui") 
local OpenFrame = Instance.new("Frame") 
local OpenTextButton = Instance.new("TextButton") 
local VanGui = Instance.new("Frame") 
local VanTextButton = Instance.new("TextButton") 
local VanTextBox = Instance.new("TextBox") 
local VanGuiCloser = Instance.new("TextButton") 
local VanGuiCloserFrame = Instance.new("Frame") 

-- Properties 
VanScreenGui.Name = "VanScreenGui" 
VanScreenGui.Parent = game.CoreGui 
-- 
OpenFrame.Name = "OpenFrame" 
OpenFrame.Parent = VanScreenGui 
OpenFrame.BackgroundColor3 = Color3.new(1, 1, 1) 
OpenFrame.Draggable = true 
OpenFrame.Position = UDim2.new(0, 27, 0, 448) 
OpenFrame.Size = UDim2.new(0, 76, 0, 29) 
OpenFrame.Style = Enum.FrameStyle.DropShadow 

OpenTextButton.Name = "Open.TextButton" 
OpenTextButton.Parent = OpenFrame 
OpenTextButton.BackgroundColor3 = Color3.new(1, 1, 1) 
OpenTextButton.Position = UDim2.new(0, 6, 0, 0) 
OpenTextButton.Size = UDim2.new(0, 50, 0, 15) 
OpenTextButton.Style = Enum.ButtonStyle.RobloxRoundButton 
OpenTextButton.Font = Enum.Font.SourceSans 
OpenTextButton.FontSize = Enum.FontSize.Size14 
OpenTextButton.Text = "OPEN" 
OpenTextButton.TextSize = 14 

VanGui.Name = "VanGui" 
VanGui.Parent = VanScreenGui 
VanGui.BackgroundColor3 = Color3.new(1, 1, 1) 
VanGui.Draggable = true 
VanGui.Position = UDim2.new(0, 33, 0, 343) 
VanGui.Selectable = true 
VanGui.Size = UDim2.new(0, 254, 0, 82) 
VanGui.Style = Enum.FrameStyle.DropShadow 
VanGui.Visible = false 

VanTextButton.Name = "Van.TextButton" 
VanTextButton.Parent = VanGui 
VanTextButton.BackgroundColor3 = Color3.new(1, 1, 1) 
VanTextButton.BackgroundTransparency = 0.5 
VanTextButton.Position = UDim2.new(0, 30, 0, 41) 
VanTextButton.Size = UDim2.new(0, 179, 0, 20) 
VanTextButton.Font = Enum.Font.Arcade 
VanTextButton.FontSize = Enum.FontSize.Size32 
VanTextButton.Text = "VAN" 
VanTextButton.TextSize = 30 

VanTextBox.Name = "Van.TextBox" 
VanTextBox.Parent = VanGui 
VanTextBox.BackgroundColor3 = Color3.new(1, 1, 1) 
VanTextBox.BackgroundTransparency = 0.5 
VanTextBox.Position = UDim2.new(0, 32, 0, 0) 
VanTextBox.Size = UDim2.new(0, 177, 0, 20) 
VanTextBox.Font = Enum.Font.Arcade 
VanTextBox.FontSize = Enum.FontSize.Size28 
VanTextBox.Text = "name" 
VanTextBox.TextSize = 25 

VanGuiCloser.Name = "VanGuiCloser" 
VanGuiCloser.Parent = VanGui 
--VanGuiCloser.Visable = true 
VanGuiCloser.BackgroundColor3 = Color3.new(1, 1, 1) 
VanGuiCloser.BackgroundTransparency = 0.5 
VanGuiCloser.Position = UDim2.new(0, 255, 0, 354) 
VanGuiCloser.Size = UDim2.new(0, 20, 0, 14) 
VanGuiCloser.Font = Enum.Font.SourceSans 
VanGuiCloser.FontSize = Enum.FontSize.Size14 
VanGuiCloser.Text = "X" 
VanGuiCloser.TextSize = 14 

OpenTextButton.MouseButton1Down:connect(function() 
     game.CoreGui.VanScreenGui.VanGui.Visible = true 
    game.CoreGui.VanScreenGui.OpenFrame.Visible = false 
end) 

VanGuiCloser.MouseButton1Down:connect(function() 
     game.CoreGui.VanScreenGui.VanGui.Visible = false 
    game.CoreGui.VanScreenGui.OpenFrame.Visible = true 
end) 

答えて

0

あなたはオープンボタンを取り除きたい場合は、単に使用:デストロイ()

buttonname.MouseButton1Click:connect(function() 
game.CoreGui.openbuttonname:Destroy() 
end) 

それはあなたがしたくないことならば、もっとしてくださいあなたが言っていることを理解するのが難しいので、明確です。

関連する問題