I am very very very new to scripting i barely know the language but i know a few things but i need help with creating a TextButton that will close out my existing screenGui. :) Also, any mentoring on scripting would be delighting.
-- Create ScreenGui local screenGui = Instance.new("ScreenGui") screenGui.Parent = script.Parent -- Create Frame local frame = Instance.new("Frame") frame.Parent = screenGui frame.Position = UDim2.new(0, 350, 0, 75) frame.Size = UDim2.new(0, 400, 0, 250) frame.BackgroundColor3 = BrickColor.Blue().Color frame.BackgroundTransparency = .3 -- Create TextLabel local textLabel = Instance.new("TextLabel") textLabel.Parent = screenGui textLabel.Position = UDim2.new (0, 350, 0, 75) textLabel.Size = UDim2.new (0, 400, 0, 250) textLabel.Text = "Welcome, click below to play! (Unfinished product, report bugs to me)" textLabel.BackgroundTransparency = 1 -- Create TextButton to close out the existing screen Gui...Help
^ pretty much creating a play button to close out the gui.
local textbutton = Instance.new("TextButton") textbutton.Parent = screengui -- Idk what you want these to be. textbutton.Position = UDim2.new (0, 0,0,0) textbutton.Size = UDim2.new (0,0,0,0) textbutton.Text = "Play" textbutton.BackgroundTransparency = 1 function onClick(mouse) script.Parent.ScreenGui:remove() end script.Parent.ScreenGui.textbutton.MouseButton1Down:connect(onClick)
Hope this helps