Making a Main Menu Screen | Roblox Studio

Поділитися
Вставка
  • Опубліковано 23 січ 2025

КОМЕНТАРІ • 145

  • @Doppy-g4q
    @Doppy-g4q 2 місяці тому +30

    function tween(obj, dur, cmd)
    game:GetService('TweenService'):Create(obj, dur, cmd):Play()
    end
    workspace.Camera.CameraType = Enum.CameraType.Scriptable
    tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame})
    first local script
    script.Parent.Mousebutton1Click:connect(function()
    local gui = script.Parent.Parent
    gui.Enabled = false
    game.Workspace = Enum.CameraType.Custom
    end)
    second local scrip

  • @checkerandu422
    @checkerandu422 22 дні тому +5

    A comment to everyone, who names their campart "Camera" : if you name your campart "Camera", it will break the code, name it something else than "Camera". Thanks for the video, helped me a lot!

  • @ditah
    @ditah 5 місяців тому +4

    really polished and good looking system, but i advise getting closer to your microphone in future videos, or adjusting it so it picks up your voice rather than the keyboard :)

    • @koaltreus
      @koaltreus  5 місяців тому +2

      Alrighty! Thanks!

  • @ceogoldfish9265
    @ceogoldfish9265 5 місяців тому +1

    Hey man great video! keep up the good work :)

  • @Frangc321
    @Frangc321 2 місяці тому +6

    Help! sometimes i get a error that says: "MenuCamera is not a valid member of Workspace" and when i check in the explorer the MenuCamera part is gone. I don't know what to do. Please someone help me!
    Edit: I figured it out and the solution is:
    Click workspace, in the properties search "Streamig enabled" click the box and disable it. Hope this helps.

  • @zahenabedin4335
    @zahenabedin4335 5 місяців тому +3

    bro i genuinelyy love u for ths

  • @gear5luffymoremeat
    @gear5luffymoremeat 6 днів тому +1

    can u help, when i did the script and went to test it, it was where i spawned can you help me figure out why

  • @ItsSederec
    @ItsSederec 3 місяці тому +6

    help my camera doesnt go to my scene it just locks nowhere near where i put the camera pls help

  • @tzar7639
    @tzar7639 4 місяці тому +3

    this doesnt work for me i always spawn as my charakter i even changed the command like you said in the comment section pls help me

  • @Wyatt07
    @Wyatt07 4 місяці тому +2

    I was trying to do this with ImageLabel and a transition to a loading screen, i gave up.
    Also roblox studio for some reason didnt show my game and im depressed cuz i spent hours making that map and its all gone

  • @gigel23d
    @gigel23d День тому

    Hey, super cool tutorial, but how can i make a GUI go to another GUI, like when i press PLAY, I will go to LOBBY, When i go lobby start button etc?

  • @Ilikesport1
    @Ilikesport1 4 місяці тому

    u explain realy good.
    thx for advices!

  • @Alokzz_
    @Alokzz_ 15 днів тому

    Anybody able to help me with the second script? I have copied the script but it says "Unable to assign property workspace. Workspace expected, got EnumItem"

  • @bloodyguns
    @bloodyguns 3 місяці тому +3

    it doesnt work for me :(

  • @r_equinox
    @r_equinox Місяць тому +1

    the camera script didn't worked for me, idk if it's because my game is R6 or something

    • @Panxd-gn6mh
      @Panxd-gn6mh 13 днів тому

      it also works in r6, try to copy it again ;)

  • @SayoToukishira
    @SayoToukishira 17 днів тому

    How do i make it so that, when i move my mouse, the camera also moves

  • @NoopDev_Too
    @NoopDev_Too 5 місяців тому +3

    How do i hide my other ScreenGui if on play screen? I added 2 screen Gui one is just called like that other one is the menu Gui i would like to hide ScreenGui when on MenuGui

    • @koaltreus
      @koaltreus  5 місяців тому +3

      in the menugui script, add:
      game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = false
      in the playbutton script, add:
      game.Players.LocalPlayer.PlayerGui.ScreenGui.Enabled = true

    • @NoopDev_Too
      @NoopDev_Too 5 місяців тому +2

      @@koaltreus Thank you! It works perfectly

    • @NoopDev_Too
      @NoopDev_Too 5 місяців тому +2

      ​​@@koaltreusI also got a question is it possible to make a BilboardGui Become visible if you pressed a GuiButton and invisible if you pressed the button again?

    • @koaltreus
      @koaltreus  5 місяців тому +2

      @@NoopDev_Too yea, thats possible

    • @NoopDev_Too
      @NoopDev_Too 5 місяців тому +1

      @@koaltreus is it then a simular script to the one what hides the screenGui but just modified by adding instead of frame name billboard name?

  • @cosmic_cattt
    @cosmic_cattt 12 днів тому

    Hey what should i do when its not putting my camera when i click the start button?

    • @cosmic_cattt
      @cosmic_cattt 12 днів тому

      mb putting my camera back to the pov of my avatar

  • @fgly1563
    @fgly1563 3 місяці тому +1

    Hey is it also possible to make a 360 cam in the sky, just like a main menu but so you can rotate it? And could you make a tutorial about it?

  • @oksej-m1t
    @oksej-m1t 20 днів тому

    it kinda works but the camera just points down in the grass and i have anchored it and made sure it was in the front plss help

  • @asianshow272
    @asianshow272 2 місяці тому

    THANK YOU!!!! Im subbing now😊

  • @Panxd-gn6mh
    @Panxd-gn6mh 13 днів тому

    Hi, how i can add music to the main menu, its kinda boring like that, whit no music

  • @VYCRPT
    @VYCRPT 5 місяців тому +2

    Idk why but it's tweening the camera to the part but then immediately going to the player without me pressing the button

    • @koaltreus
      @koaltreus  5 місяців тому +1

      set the cameratype to scriptable, then i think itll work

    • @Cowyblox
      @Cowyblox 5 місяців тому

      @@koaltreus I had the same problem and tried it, it didn't work, any other ideas to make this work?

    • @aRandomDudeRbx
      @aRandomDudeRbx 5 місяців тому

      @@koaltreus That doesnt work

    • @_leggsy
      @_leggsy 5 місяців тому

      @@koaltreus I have the same problem. Is there any way to fix it?

    • @Naz_11Yt
      @Naz_11Yt 3 місяці тому

      @@koaltreus still doesn't work, could you help ?

  • @okelahbegitu4494
    @okelahbegitu4494 4 місяці тому +1

    the player when dead, the Text Button still appeared and the cam go back to MenuCam

    • @koaltreus
      @koaltreus  4 місяці тому +3

      @@okelahbegitu4494 disable “ResetGuiOnSpawn” in the menugui

  • @koaltreus
    @koaltreus  5 місяців тому +2

    1k views!! Thanks y’all! ❤
    Edit: 2K VIEWS NOW?????????

    • @mankibad
      @mankibad 5 місяців тому +2

      nah u deserve 100k views

    • @RamleYt-s9z
      @RamleYt-s9z 11 днів тому

      now 22 k congrats

  • @harrison_0312
    @harrison_0312 3 місяці тому

    hey bro do yk why however much i rotate the cube (camera) whenever i press play it always flops to the side or goes upside down? thanks

  • @ditah
    @ditah 5 місяців тому +1

    Hey, commenting again, but i tried combining this with surface GUI for something, and it worked really good, but a problem is that every time the character resets or dies, the menu repeats the tweening and goes to the menu screen again, is there a way to solve that, or is it easier to just turn off the reset option in the roblox menu? (because the character wont take damage in my game anyways) - I'm going to put my code for that below if needed
    Another REALLY important bug this time tho, is that like 60% of the time the screen cuts to the regular avatar camera right after the tweening finishes, i've set the workspace camera to scriptable and so on already, but i'll see if it could be because of another script im using for player camera effects, i dont think its because of another script tho, because the cameratype remains scriptable even when it kicks me off the loading screen.
    Code:
    > Local-script in MenuGUI
    function tween(obj, dur, cmd)
    game:GetService('TweenService'):Create(obj, dur, cmd):Play()
    end
    local MenuCam = workspace:WaitForChild("MenuCam")
    workspace.Camera.CameraType = Enum.CameraType.Scriptable
    tween(workspace.Camera, TweenInfo.new(1), {CFrame = MenuCam.CFrame})
    > Local-script under Play(button)
    script.Parent.MouseButton1Click:Connect(function()
    local gui = script.Parent.Parent
    game.Workspace.Camera.CameraType = Enum.CameraType.Custom
    end)
    Any help from anyone appreciated, even tho i kind of broke it, its still a really good and quick yet versatile tutorial that i learnt a lot from.
    Also, the scripts are modified according to what i needed in my game, i used workspace:WaitForChild("MenuCam") instead of what's in the video, because the MenuCam would load later causing the whole script to stop when it couldn't find the MenuCam part, and so on.

    • @koaltreus
      @koaltreus  5 місяців тому +2

      You could disable the reset button or disable ‘ResetGuiOnSpawn’ in the menu gui

    • @ditah
      @ditah 5 місяців тому +1

      @@koaltreus thanks, i didnt know that existed

  • @usedtobel1ll1gam3s
    @usedtobel1ll1gam3s 5 місяців тому

    The first script wont work i put the script in and it has the play button but its not at the scenery its where my spawn point is pls help

    • @koaltreus
      @koaltreus  5 місяців тому +1

      @@usedtobel1ll1gam3s in the first script, replace every ‘workspace.MenuCam’ with ‘workspace:WaitForChild(“MenuCam”)’

    • @rockstarfoxy2852
      @rockstarfoxy2852 2 місяці тому

      @@koaltreus I had the same problem, and I tried that but it doesn't work

  • @DenNorskeDuden-543
    @DenNorskeDuden-543 11 днів тому

    thanks for the tutorial but i cant place anything if i want the menu to work(im trying to make a game)

  • @eersatzz
    @eersatzz 3 місяці тому

    is there a way to have the game load on the camera instantly instead of seeing the transition TO the camera spot?

    • @koaltreus
      @koaltreus  3 місяці тому +3

      @@eersatzz in the menugui script, where you see “tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame})” replace the 1 with a 0

  • @suissiied
    @suissiied Місяць тому

    Hello, i have a problem, my camera shows a completely different place than whats its supposed to. help pls

  • @EdgefulVow
    @EdgefulVow 5 місяців тому +1

    Great tutorial, but what do I need to do if I want to add a blur effect to it?

  • @dwqlihted
    @dwqlihted 2 місяці тому

    Hi! everything works just fine, but the problem is after i press play, it just makes the camera stuck at spawn, any ideas on this?

  • @trillius
    @trillius 13 днів тому +1

    THANKSSSSS

  • @GDishard
    @GDishard 5 місяців тому

    can you make a custom animation tutorial? ive tried once, but its never worked (i used the inbuilt animation editors on rigs)

  • @SayokaCO
    @SayokaCO 5 днів тому

    hey man, love the vid and it was very helpful, but i got an issue if u dont mind helping. so it goes to the cutscene and everything perfectly, but when i click the play button it dosent bring me back and just removbes the play button
    Edit: I found the solution. replace this script: script.Parent.Mousebutton1Click:connect(function()
    local gui = script.Parent.Parent
    gui.Enabled = false
    game.Workspace = Enum.CameraType.Custom
    end)
    With this one: script.Parent.MouseButton1Click:Connect(function()
    local gui = script.Parent.Parent
    gui.Enabled = false -- Disable the GUI
    -- Reset camera to the player's character
    local player = game.Players.LocalPlayer
    local character = player.Character or player.CharacterAdded:Wait()
    local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
    -- Move the character to a spawn point (ensure you have a SpawnLocation in Workspace)
    local spawnLocation = game.Workspace:FindFirstChild("SpawnLocation")
    if spawnLocation then
    humanoidRootPart.CFrame = spawnLocation.CFrame + Vector3.new(0, 3, 0) -- Offset to prevent clipping
    else
    warn("SpawnLocation not found in Workspace!")
    end
    -- Reset the camera type
    local camera = game.Workspace.CurrentCamera
    camera.CameraType = Enum.CameraType.Custom
    end)
    If yall have any issues let me know

  • @Etbi0
    @Etbi0 4 місяці тому

    I need your help. The code works successfully but it does not disappear when I press the ''Play'' button. What should I do?

  • @leventkiani
    @leventkiani 4 місяці тому

    when i cklick start then the start gui go but im still in the menu screen

  • @FilmTune
    @FilmTune 5 місяців тому +1

    question is there a way to add animated npcs to your main menu or cutscene? I would like to know

    • @koaltreus
      @koaltreus  5 місяців тому

      Yes, there is

    • @FilmTune
      @FilmTune 5 місяців тому

      @@koaltreus is there a way to make a video to explain it or explain it in another way I'm wondering I know this might be a waste of your time I'm sorry about that

    • @koaltreus
      @koaltreus  5 місяців тому

      @@FilmTune it’s all good, I might make a vid on it soon

    • @FilmTune
      @FilmTune 5 місяців тому +1

      @@koaltreus well cya soon I guess thanks for your help👍
      oh also whats your roblox profile I wanna give you a request and follow you for your help

    • @koaltreus
      @koaltreus  5 місяців тому +1

      @@FilmTunemy profile is Koaltreus

  • @MilitaryElite2024
    @MilitaryElite2024 4 місяці тому +1

    I don’t see anything when I play the camera except the void why?

    • @koaltreus
      @koaltreus  4 місяці тому +1

      happened to me too. in the menugui script, try replacing every “workspace.MenuCam” with “workspace:WaitForChild(‘MenuCam’)”

    • @MilitaryElite2024
      @MilitaryElite2024 4 місяці тому +1

      @@koaltreus ok

  • @JustMe728
    @JustMe728 29 днів тому

    dude, when i typed the script, menucam isnot working, camera is going somewhere else, not here i want, this is so fake man, can u post new fixed video of this ?

  • @AkbarUmmah
    @AkbarUmmah 5 місяців тому +2

    Can you add a *"Copy and Paste"* to the code? Thanks!

    • @AkbarUmmah
      @AkbarUmmah 5 місяців тому +1

      Also, it made it so it went to the player without me pressing the button and had me stuck there. Thanks!

    • @AkbarUmmah
      @AkbarUmmah 5 місяців тому +2

      UPDATE = NVM IT WORKED!!!! I CANT FIND THE WORDS TO THANK YOU. CAN I ADDD YOU ON DISCORD??

  • @UnidentifiedToastProductions
    @UnidentifiedToastProductions 3 місяці тому

    NVM, I fixed it, amazing tutorial

  • @Colus3531
    @Colus3531 5 місяців тому

    Yo thanks Koaltreus!!!

  • @duckbusiness9524
    @duckbusiness9524 5 місяців тому +1

    yo bro everytime i reset the main menu gonna appear again how do i fix it?

    • @koaltreus
      @koaltreus  5 місяців тому +1

      @@duckbusiness9524 disable “ResetGuiOnSpawn” in the menugui’s properties

    • @duckbusiness9524
      @duckbusiness9524 5 місяців тому +1

      @@koaltreus tysm its worked

  • @iamyourpappyful
    @iamyourpappyful Місяць тому

    but when you reset it does it again.

  • @Sheration
    @Sheration Місяць тому

    yo somethings wrong it just locks in place and it saids that its not a valid member of workspace

    • @Sheration
      @Sheration Місяць тому

      figured it out but play wont dissapear

  • @iquityoutube
    @iquityoutube Місяць тому

    camera shows a completely different place than what its supposed to, and it still shows the camera's perspective even after i press play
    *found a solution to the second one, first one still remains unsolved*
    for the second one, the error says: Unable to assign property Workspace. Workspace expected, got EnumItem
    script:
    script.Parent.MouseButton1Click:connect(function()
    local gui = script.Parent.Parent
    gui.Enabled = false
    game.Workspace = Enum.CameraType.Custom
    end)
    ended up asking chat gpt,
    line 4 was supposed to be
    local camera = game.Workspace.CurrentCamera
    camera.CameraType = Enum.CameraType.Custom
    end)

    • @TwoPlayerFilms
      @TwoPlayerFilms Місяць тому

      which code's line 4?

    • @iquityoutube
      @iquityoutube Місяць тому

      @@TwoPlayerFilms dont remember but this is the script i use:
      local TweenService = game:GetService('TweenService')
      function tween(obj, tweenInfo, cmd)
      TweenService:Create(obj, tweenInfo, cmd):Play()
      end
      local camera = workspace.CurrentCamera
      camera.CameraType = Enum.CameraType.Scriptable -- Enable manual control

      local Cam = workspace:WaitForChild("Cam")
      local tweenInfo = TweenInfo.new(0.01)
      tween(camera, tweenInfo, {CFrame = Cam.CFrame})

    • @TwoPlayerFilms
      @TwoPlayerFilms Місяць тому

      @@iquityoutube thank you for your help!!! But, I found something else within the time waiting!!

  • @mikebarker380
    @mikebarker380 3 місяці тому +1

    it who'd be great is you put the script in the discerption

  • @byCloakerGaming
    @byCloakerGaming Місяць тому

    the start button doesnt work

  • @_anckr
    @_anckr 5 місяців тому +1

    THANK YOU!!!!!

  • @KING-ZEN-YOUTUB-ECHANNEL
    @KING-ZEN-YOUTUB-ECHANNEL Місяць тому

    Why is mine going under the map ;-;

  • @finnmatthews2775
    @finnmatthews2775 Місяць тому

    make a tutorial on main menu music pls

  • @Littlebear1812
    @Littlebear1812 3 місяці тому

    In the second script line isn't working its something witht the
    Gui.enabled

    • @Littlebear1812
      @Littlebear1812 3 місяці тому

      Please help

    • @runer2343qqwe
      @runer2343qqwe 28 днів тому +1

      script.Parent.MouseButton1Click:Connect(function()
      local gui = script.Parent.Parent
      gui.Enabled = false

      game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
      end)

    • @mschmnn
      @mschmnn 15 днів тому

      @@runer2343qqwe My code didn't work before switching the second script with yours. Thanks so much!

  • @thatshiairaqi9886
    @thatshiairaqi9886 5 місяців тому

    Thank you!

    • @koaltreus
      @koaltreus  5 місяців тому

      @@thatshiairaqi9886 np!

  • @The1Slappple
    @The1Slappple 3 місяці тому

    How do you get the sitting guy

    • @koaltreus
      @koaltreus  3 місяці тому

      create a guy using the rig builder (found in 'Avatar' section) and just rotate and move its bodyparts to make a sitting pose

    • @The1Slappple
      @The1Slappple 3 місяці тому

      @@koaltreus the script didn’t work for the camera

    • @The1Slappple
      @The1Slappple 3 місяці тому

      @@koaltreus i tried it the button didn’t disappear when i press play and I didn’t pop up the the camera when i spawned

  • @ItsSederec
    @ItsSederec 3 місяці тому

    you never said anything about A. the camera having range
    B. Camera has a limited amount of uses
    explain

  • @icyy_dev
    @icyy_dev 2 місяці тому

    The script doesn't work.

  • @JustAMinecraftChannel
    @JustAMinecraftChannel 2 місяці тому

    the script to stop the animation doesnt work

    • @JustAMinecraftChannel
      @JustAMinecraftChannel 2 місяці тому

      Mousebutton1Click is not a valid member of TextButton "Players.zaza19745.PlayerGui.Main Menu.Frame.Level 1 Title

  • @MasonPaniagua
    @MasonPaniagua Місяць тому

    how u get the cmaera

    • @T9O_Blitz
      @T9O_Blitz Місяць тому

      Make a part and name it MenuCam

  • @FishKing881
    @FishKing881 21 день тому

    the butto script dosent work for me

    • @hhjhjjhjjhjhjhjhjhjhjhh
      @hhjhjjhjjhjhjhjhjhjhjhh 15 днів тому

      if you copied it from the pinned comment, make sure the "Mousebutton" in the first line is "MouseButton". If that doesn't work, then idk because I'm not good at coding

  • @Kohkakave
    @Kohkakave 5 місяців тому +1

    THIS SHIT DOESNT WORK IN MY GAYM IT SAYS:i cant find MENUCAM in workspaceeeeeeeeeeeeeeeeeeeee

    • @Icee-Da-Axolotl
      @Icee-Da-Axolotl 5 місяців тому

      did you name the camera menucam?

    • @Kohkakave
      @Kohkakave 5 місяців тому

      @@Icee-Da-Axolotl MenuCam

    • @tobix7779
      @tobix7779 5 місяців тому

      same problem did you find solution ?

    • @GofrHD
      @GofrHD 4 місяці тому

      @@Kohkakave workspace:WaitForChild(MenuCam")

    • @dwqlihted
      @dwqlihted 2 місяці тому

      turn streaming enabled off in workspace and itll work

  • @leventkiani
    @leventkiani 4 місяці тому

    i have it was i cool tutorial

  • @Fetal-noob2
    @Fetal-noob2 2 місяці тому

    I have a glitch where somtimes it worked and sometimes doesn’t

  • @Hittzo
    @Hittzo 5 місяців тому

    Ok

  • @izzysucks325
    @izzysucks325 2 місяці тому

    super simple thank youuu

  • @learningscripting
    @learningscripting 5 місяців тому +2

    function tween(obj, dur, cmd)
    game:GetService('TweenService'):Create(obj, dur, cmd):Play()
    end
    workspace.Camera.CameraType = Enum.CameraType.Scriptable
    tween(workspace.Camera, TweenInfo.new(1), {CFrame = workspace.MenuCam.CFrame})
    LocalScript:6: MenuCam is not a valid member of Workspace "Workspace".
    That error happens even though i have put in MenuCam in workspace, i'm kinda new to scripting, do i have to use 'MenuCam.Parent = game.Workspace'?

    • @koaltreus
      @koaltreus  5 місяців тому +2

      @@learningscripting maybe check if your MenuCam part is anchored, if not, it could’ve fallen into the void. But in the script, try replacing every “workspace.MenuCam” with “workspace:WaitForChild(‘MenuCam’)”

    • @EpicZoPlayz
      @EpicZoPlayz 5 місяців тому

      omg ur a life saviour, TYSM

  • @RiglessX
    @RiglessX 2 місяці тому

    I recommended using "Variables" so it still works without causing any problems
    Here is mine:
    local lobbyF = workspace:WaitForChild("Lobby") -- if your menucam is in a folder or model in workspace
    local menuF = lobbyF:WaitForChild("Menu") -- if your menucam is inside the lobbyF and another folder or model
    local menuCam = menuF:WaitForChild("MenuCam") -- your actual menucam
    function tween(obj, dur, cmd)
    game:GetService('TweenService'):Create(obj, dur, cmd):Play()
    end
    workspace.Camera.CameraType = Enum.CameraType.Scriptable
    tween(workspace.Camera, TweenInfo.new(1), {CFrame = menuCam.CFrame}) -- add the menucam here

    • @iquityoutube
      @iquityoutube Місяць тому

      what is lobby supposed to be here

    • @RiglessX
      @RiglessX Місяць тому

      @@iquityoutube if your menucam is in a folder named "Lobby" i only done it for organized workspace objects...

  • @julessparkles8556
    @julessparkles8556 Місяць тому

    Thank you!