Hello! Want to know how to make games? Well, its for you!
Today i will teaching you how to make a Main menu!
Lets get started. (A loading bar.)
Installing Gui:
First add a ScreenGui (Name ScreenGui - Loading bar.) in StarterGui.
Then Add a Frame. ( Position = {0, 0},{0, 0} ) ( Size = {0, 1702},{0, 719} )
After that, Add a TextLabel in Frame. ( TextLabel Position = {0.178, 0},{0.465, 0} )
( TextLabel Size = {0, 650},{0, 50} )
You can customize the Gui if you want.
Now lets get into scripting.
Scripting:
Well done if are at this step.
First, add a script in your Frame.
Your script should look like this :
wait(20)
script.Parent.Visible = false
Add a LocalScript in Frame. Should look like this (Its not obligate, if you want add it.):
local Frame = script.Parent
local Play = script.Parent.Play
local Enjoy = script.Parent.Enjoy
while true do
wait(2)
Frame.BackgroundColor3 = Color3.new(1, 0, 0)
Play.BackgroundColor3 = Color3.new(0.603922, 0, 0)
Enjoy.BackgroundColor3 = Color3.new(0.603922, 0, 0)
wait(2)
Frame.BackgroundColor3 = Color3.new(0, 1, 0)
Play.BackgroundColor3 = Color3.new(0, 0.533333, 0)
Enjoy.BackgroundColor3 = Color3.new(0, 0.533333, 0)
wait(2)
Frame.BackgroundColor3 = Color3.new(1, 1, 0)
Play.BackgroundColor3 = Color3.new(0.721569, 0.721569, 0)
Enjoy.BackgroundColor3 = Color3.new(0.721569, 0.721569, 0)
-- wait(2)
--Frame.BackgroundColor3 = Color3.new(1, 0, 0)
--Play.BackgroundColor3 = Color3.new(0.603922, 0, 0)
--Enjoy.BackgroundColor3 = Color3.new(0.603922, 0, 0) -- Copy and paste this part if you want to add more colors. (Make sure to remember to Edit. And remove all the ( -- ).
end
Then, add a Script in TextLabel :
while true do
wait(0.4)
script.Parent.Text = "LOADING."
wait(0.4)
script.Parent.Text = "LOADING.."
wait(0.4)
script.Parent.Text = "LOADING..."
end
Good job if you finished now, we will start Making the main menu.
Installing Gui :
Add a ScreenGui in StarterGui. (Name ScreenGui - Menu.)
Add a 2 Frames in Menu. ( Frame 1 Position = {0, 0},{0, 0} ) ( Frame 2 Size = {1, 0},{1, 0} )
For Frame 2 all the same. ( Name Frame 1 = Frame1 ) ( Name Frame 2 = Frame2 )
Add a 2 TextButton in Frame1. (Name TextButton 1 - Play.) (Name TextButton 2 - SettingsButton.
Add a TextButton in Frame2. ( Position and size like you want. ) ( Name it ExitButton. )
NOTE : Put Frame2 in Frame1.
NOTE 2 : Do Frame2 Visible = fasle.
Scripting :
Add a LocalScript in PlayButton. It should look like this :
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
end)
Add a LocalScript in SettingsButton Should be like that :
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Frame2.Visible = true
end)
Add a Other LocalScript in ExitButton. It should be like that :
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
end)