Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a GUI?

Asked by 10 years ago

I want to make a Custom GUI without plugins just Scripting. I have no idea how to start it so if you could help me it would be really helpful.

0
Are you in the experimental ribbon UI for studio or normal UI? Freemium 110 — 10y

3 answers

Log in to vote
0
Answered by 10 years ago

Click on StarterGui Then click Insert Basic Object Then click Screen GUI (rename it what ever you want) Then click on Insert Basic Objects Then click Text Button (This is the button you can click on) (Or click Frame for a backing to your GUI) Go into the properties of each to change the Color or Text

I'm not great at the Commection line in functions but what I do is search up Shop GUI in free models and get the script from a or open button

That's how you start the GUI you can make it just Text Or you can make a shop which you would need to make stuff Visible = false and stuff

I know this isn't that helpful but this is all I know.

Ad
Log in to vote
0
Answered by 10 years ago

Basicly the person above answered your question as well as it gets... You are gonna need to completely explain everything you want to do what game it is for... But I guess all you are gonna get is what the people up there say I have no idea what you are requesting... For what I know you could be making somthing as advance as me, but yeah I am sure you got your answer...

Log in to vote
0
Answered by
nate890 495 Moderation Voter
10 years ago

Assuming that you're asking how to make a GUI purely out of code (so the code inserts the GUI objects) then the following code creates a GUI from scratch and inserts it into a player's PlayerGui when they touch a part.

function createGUI() -- function that creates our GUI
    -- creation of GUI objects
    local screenGui = Instance.new("ScreenGui")
    local frame = Instance.new("Frame", screenGui)
    local textButton = Instance.new("TextButton", frame)

    screenGUI.Name = "NewGui"

    frame.Size = UDim2.new(1, 0, 1, 0) -- UDim2 function is used to set the size and position of GUI
    textButton.Size = UDim2.new(0.1, 0, 0.1, 0)
    textButton.Position = UDim2.new(0.45, 0, 0.45, 0)

    return screenGui
end

part.Touched:connect(function(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player and not player.PlayerGui:FindFirstChild("NewGui") then
        -- insert GUI into the player's PlayerGui so it becomes visible
        createGUI().Parent = player.PlayerGui
    end
end)

Answer this question