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

How to make a GUI? [Answered] [closed]

Asked by 8 years ago

I wish to make a screen-GUI with 2 cut scenes that move from one scene to another , I don't know how to script it and I want a image and letters in the cut scene not just blank color or space , could someone please help ?

0
What are all you looking for and trying to do? Is it a surface gui? A cutscene gui? Or a screen gui that is up while there is a cutscene? MrLonely1221 701 — 8y
0
screen - gui that is up while there is a cutscene KelsiCabana 70 — 8y
0
Are you trying to make it so that the cutscene goes from place to place and changes the gui text? MrLonely1221 701 — 8y

Closed as Not Constructive by SimplyRekt and evaera

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
1
Answered by 8 years ago

Create a local script and put it anywhere except ServerScriptService and ReplicatedFirst.

local player = game.Players.LocalPlayer
local int = Instance.new("ScreenGui")
int.Parent = player.PlayerGui
local frame = Instance.new("Frame")
frame.BackgroundColor3 = Color3.new(255/255, 255/255, 255/255)
frame.Size = UDim2.new(1,0,1,0)
frame.Position = UDim2.new(-1,0,0,0) --Sets beyond the left side of the screen.
frame.Parent = int
local img = Instance.new("ImageLabel")
img.BackgroundTransparency = 1
img.Image = "YOUR IMAGE HERE"
img.ZIndex = 5
img.Parent=frame
img.Size = UDim2.new(0.1,0,0.15,0)
img.Position = UDim2.new(0.45,0,0.4,0)
local txt = Instance.new("TextLabel")
txt.Text = "YOUR TEXT HERE"
txt.TextColor3 = Color3.new(0/255, 0/255, 0/255)
txt.Position = UDim2.new(0.35,0,0.55,0)
txt.Size = UDim2.new(0.3,0,0.1,0)
txt.Font = "SourceSansLight"
txt.TextScaled = true
txt.TextWrapped = true
txt.ZIndex = 5
txt.BackgroundTransparency = 1
txt.Parent = frame
local button = Instance.new("TextButton")
button.Parent = frame
button.Text = "Exit Gui"
button.Position = UDim2.new(0.35,0,0.7,0)
button.Size = UDim2.new(0.3,0,0.1,0)
button.ZIndex = 5
button.Visible = false
wait(3)
frame:TweenPosition(UDim2.new(0,0,0,0)) --Moves to the a place where the player can see the frame.
wait(5)
button.Visible = true
button.MouseButton1Down:connect(function()
    frame:TweenPosition(UDim2.new(1,0,0,0)) --Moves to the far right of the screen where the player can not see it.
    wait(2)
    int:Destroy()
end)

This will make it so it goes to the players view and then out of it.

0
How could I customize the screen to have words on it , and maybe image KelsiCabana 70 — 8y
0
That's what I was trying to help you do. xD I just wanted to figure out what you wanted first MrLonely1221 701 — 8y
0
Yeah I want it to be able to have a image , text and then end , could you still help me? KelsiCabana 70 — 8y
0
Yeah I can still help. I'm just wondering what all you want to do. Like if you want it to go from one spot to another and display different text at different spots. MrLonely1221 701 — 8y
View all comments (2 more)
0
Yeah thats exactly what I want , please help ! KelsiCabana 70 — 8y
0
I will be editing my recent post on this with the code that will do everything you wanted. ;) Spooksletsky 55 — 8y
Ad
Log in to vote
0
Answered by 8 years ago

If you're fine with it just hopping from spot to spot you can use this code. Note: This current script will have it circle around the block.

local target = workspace.FirstBlock;
local target2 = workspace.SecondBlock;
local target3 = workspace.ThirdBlock;

local camera = workspace.CurrentCamera;
camera.CameraSubject = target;
camera.Focus = CFrame.new(target.Position);
local angle = 0;
local i = 0;

script.Parent.Button1.MouseButton1Down:connect(function()
    camera.CameraSubject = target2;
    script.Parent.Button1.Visible = false;
    script.Parent.Button2.Visible = true;
    script.Parent.InfoFrame2.Visible = true;
end);

script.Parent.Button2.MouseButton1Down:connect(function()
    camera.CameraSubject = target3;
    script.Parent.Button2.Visible = false;
    script.Parent.Button3.Visible = true;
    script.Parent.InfoFrame2.Visible = false;
    script.Parent.InfoFrame3.Visible = true;
end);

script.Parent.Button3.MouseButton1Down:connect(function()
    script.Parent.Button3.Visible = false;
    script.Parent.InfoFrame3.Visible = false;
    camera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid;
    camera.CameraType = "Custom";
end);

while wait() do
    camera.CoordinateFrame = CFrame.new(target.Position) * CFrame.Angles(0, angle, 0) * CFrame.new(0, 5, 20);
    camera.Focus = CFrame.new(target.Position);
    camera.CameraType = Enum.CameraType.Scriptable;
    camera.CameraSubject = target;
    angle = angle + math.rad(.25);
    i = i + 1;
end;

Your structure in startergui should be StarterGui

ScreenGui Script Button1 Visible = true Button2 Visible = false Button3 Visible = false InfoFrame1 Visible = true InfoFrame2 Visible = false InfoFrame3 Visible = false

You should have the 3 blocks in workspace.

This should work. You should just need your 3 blocks in workspace (The camera should circle them), have three buttons in a gui, and the three information frames.