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

Main Menu Problems. How to disable reset character and character options settings?

Asked by 2 years ago
Edited 2 years ago

Hi, hello, it was Tuesday and i finally made a main menu for my game. It looks nice and cool and the buttons are working perfectly. But i have a problem.

The player can do suicide, and that will ruin the GUI. Why?

  1. After suicide, apparently the StarterGUI reloads itself with it's default state .I mean such as, whether the ScreenGUI inside it is enabled or not. e.g: i set the HUD ScreenGUI to be enabled by default, and disabled it when a player joins, only enabling it after they hit play. But if the player does suicide, the default state loads, and the main menu will be overlaid with the HUD's GUI.

  2. The player can fiddle around with the camera setting in the Roblox settings (such as follow, classic, and default kinda stuff), and when they do the camera just, messes up. (My main menu has a camera set on a part's CFrame)

  3. The default gui is still on. The slotbar and the chat and the inventory, it's still there. I haven't looked about how to disable it.

And that's about the problems that I'm currently having. Any help, is much appreciated. Thanks.

Also i'm sorry if my wording is bad, because i'm not good at English.

1 answer

Log in to vote
0
Answered by
Speedmask 661 Moderation Voter
2 years ago
Edited 2 years ago

hello,

your last two are more straightforward, so I will answer them first.

2) what you want is DevComputerCameraMode. try player.DevComputerCameraMode = Enum.DevComputerCameraMovementMode.Scriptable (serverscript only). be sure to switch it back afterwards.

3) simple. check out this post (localscript only). however, this will temporarily disable the chat, inventory, etc. except for the menu.

as for the suicides, I have not actually worked with guis before... at all, so I will give two solutions in case one is impossible. someone more experienced might have a better solution.

1A) you may want to keep a value on the player to decide which gui they spawn with. so you can set their default gui as the main menu by default, but rotate this out to hud when they hit play, rather than always have the hud as starter.

1B) if that is not possible because you cannot change the starting gui, use a CharacterAdded event in combination with a value that tells you whether to hide the hud or not. if they are in the menu, turn this on. when they hit play, turn it off.

0
I see, i've actually pondered upon the idea to make a value like that. With your answer i'm reassured. Thanks a bunch! Also thanks for the camera one, for the CoreGUI i've figured it out with a simple googe search. I was being lazy at the time i wrote the post. Again, thanks. iMazariuz 36 — 2y
Ad

Answer this question