#Main Menu Gui help pls

464 messages · Page 1 of 1 (latest)

slow vault
#

Hi, I am making a horror game but because I have set the player to be stuck in first person mode, I needed to keybind the 'controls' and 'updates' GUI's in StarterGUI area. The issue I am having is that, when both are keybinded to separate keys - one of them is keybinded to U and the other to O - neither of the scripts work, but when only one of them is binded, that script works perfectly. Basically, I am trying to make a main menu with CONTROLS and UPDATES pop-up GUIs binded with keys U and O. Can anyone help or is it just meant to be only one can work?

#

This is the script I am using for the GUI:

`local toggle = false -- false is Off; true is On

function onKeyPress(actionName, userInputState, inputObject)
if userInputState == Enum.UserInputState.Begin then
print("U was pressed")
if toggle == false then
toggle = true
script.Parent.Visible = false
script.Parent.Parent.TextButton.Visible = false
script.Parent.Parent.UpdateLog.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo1.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo2.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo3.Visible = true
script.Parent.Parent.UpdateLog.ViewportFrame.Visible = true
script.Parent.Parent.CONTROLS.Visible = false
else
toggle = false
script.Parent.Visible = true
script.Parent.Parent.TextButton.Visible = true
script.Parent.Parent.UpdateLog.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo1.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo2.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo3.Visible = false
script.Parent.Parent.UpdateLog.ViewportFrame.Visible = false
script.Parent.Parent.CONTROLS.Visible = true
end
end
end

game.ContextActionService:BindAction("keyPress", onKeyPress, false, Enum.KeyCode.U)`

#

Main Menu Gui help pls

tepid moat
#

i dont have much knowledge with cas

copper silo
#

In a local script, use "UserInputService"

local UI = game:GetService("UserInputService")

And now whenever the player press the a key it will check if the key is X and do the task

UI.InputBegan:Connect(function(key)
    if key.KeyCode == Enum.KeyCode.E then
        --Open/close gui
    end
end)
copper silo
tepid moat
#
UI.InputBegan:Connect(function(input, istyping)
    if istyping then return end
    if input.KeyCode == Enum.KeyCode.E then
        --Open/close gui
    end
end)```
#

if u want it to not do it while typing theres a fix

slow vault
#

so where would i put this stuff?

#

ive only been doing roblox studio scripting for about a week

slow vault
dapper abyssBOT
#

studio** You are now Level 1! **studio

slow vault
#

local UI = game:GetService("UserInputService")

UI.InputBegan:Connect(function(O)
if key.KeyCode == Enum.KeyCode.O then
script.Parent.Visible = false
script.Parent.Parent.TextButton.Visible = false
script.Parent.Parent.Updates.Visible = false
script.Parent.Parent.controls.Visible = true
script.Parent.Parent.controls.frame1.Visible = true
script.Parent.Parent.controls.control1.Visible = true
script.Parent.Parent.controls.control2.Visible = true
script.Parent.Parent.controls.control3.Visible = true
else
script.Parent.Visible = true
script.Parent.Parent.TextButton.Visible = true
script.Parent.Parent.Updates.Visible = true
script.Parent.Parent.controls.Visible = false
script.Parent.Parent.controls.frame1.Visible = false
script.Parent.Parent.controls.control1.Visible = false
script.Parent.Parent.controls.control2.Visible = false
script.Parent.Parent.controls.control3.Visible = false
end
end)

#

ok i just realised i was supposed to put 'key' and not 'o' - it works now

#

but now how do i make it so that when you press 'o' again, it does the opposite? as in, it reverts ?

slow vault
#

both of them work now, but only one of them makes the 'PLAY', 'CONTROLS' and 'UPDATES' buttons disappear..? any way to fix this too?

errant sun
#

N

slow vault
#

(i want both of them to make the buttons disappear until their keybind is pressed again.. any ideas?

errant sun
#

Whats

slow vault
#

?

errant sun
#

What do you need to fix

slow vault
#

ok so now it half works

#

so heres the script i am using

#

local UI = game:GetService("UserInputService")

UI.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.U then
script.Parent.Visible = false
script.Parent.Parent.TextButton.Visible = false
script.Parent.Parent.UpdateLog.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo1.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo2.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo3.Visible = true
script.Parent.Parent.UpdateLog.ViewportFrame.Visible = true
script.Parent.Parent.CONTROLS.Visible = false
else
script.Parent.Visible = true
script.Parent.Parent.TextButton.Visible = true
script.Parent.Parent.UpdateLog.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo1.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo2.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo3.Visible = false
script.Parent.Parent.UpdateLog.ViewportFrame.Visible = false
script.Parent.Parent.CONTROLS.Visible = true
end
end)

errant sun
#

Continue

#

Remove lot of stuff and rewrite on other script

#

It can cause bugs

slow vault
#

wait wdym

errant sun
#

I mean remove half

slow vault
#

which parts??

errant sun
#

And teplace on other sfript

#

Which is working and kot working

#

Half of it

slow vault
#

the ones that are supposed to disappear for both?

errant sun
#

Which is not working put on other script

#

And

#

You hav else for nothing

slow vault
#

put on a new script yes? local or not?

errant sun
#

Local for sure

#

You said that half doesn't work

#

Just stay working stuff here

#

And put part on other script

#

That not working

slow vault
#

what i mean by that is, when i press E, the play button ,updates button, and controls button are to disappear until i repress E (E makes the gui for controls appear)

errant sun
#

You mean when you press e it appears again

slow vault
#

yea

errant sun
#

Can u send video or more info

slow vault
#

yea one min ill record a video

errant sun
#

I'll try

slow vault
dapper abyssBOT
#

studio** You are now Level 2! **studio

slow vault
#

thats the video

errant sun
#

Why i cant open this file

slow vault
#

idk i just clicked attach

#

is there a different way to add it??

errant sun
#

Idk

#

Can u put more info

slow vault
errant sun
#

About it

slow vault
#

nvm it just did same thing

errant sun
#

Ye

#

So you said that console appears and dissapears on menu

#

And move mouse jn first person?

#

In*

slow vault
#

so its a main menu gui and it has a play, updates, and controls buttons the only one which is clickable is the play button because when you spawn in, it is place where ur cursor is

errant sun
#

Ah

#

Okay

slow vault
#

updates is keybinded to U

errant sun
#

U put it to first person

#

Ok

slow vault
#

and controls is keybinded to O

errant sun
#

Ye

#

Ok

slow vault
#

but they both disappear when u click play which is good but basically the issue im having is that when you click O, the controls is supposed to appear and then the buttons disappear until you exit 'controls' by pressing O again - it only does half the job, since you press O and then the controls appear but the issue is that you can still see the buttons and when you press O nothing happens, but if you press any other button then controls disappears

#

so thats why i say it half works , cus it only does half of what i was wanting it to do

errant sun
#

That's what i already mean to

#

Replace script

#

And rewrite it

#

So csn u send me your script

#

I can place a code here

#

Imma judt looking at it and fix it

slow vault
slow vault
errant sun
#

Ye

#

First i recom to disable reset

slow vault
#

UPDATES script:

#

local UI = game:GetService("UserInputService")

UI.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.U then
script.Parent.Visible = false
script.Parent.Parent.TextButton.Visible = false
script.Parent.Parent.UpdateLog.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo1.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo2.Visible = true
script.Parent.Parent.UpdateLog.UpdateLoginfo3.Visible = true
script.Parent.Parent.UpdateLog.ViewportFrame.Visible = true
script.Parent.Parent.CONTROLS.Visible = false
else
script.Parent.Visible = true
script.Parent.Parent.TextButton.Visible = true
script.Parent.Parent.UpdateLog.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo1.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo2.Visible = false
script.Parent.Parent.UpdateLog.UpdateLoginfo3.Visible = false
script.Parent.Parent.UpdateLog.ViewportFrame.Visible = false
script.Parent.Parent.CONTROLS.Visible = true
end
end)

errant sun
#

It will really destroy your game

slow vault
#

CONTROLS script:

#

local UI = game:GetService("UserInputService")

UI.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.O then
script.Parent.Visible = false
script.Parent.Parent.TextButton.Visible = false
script.Parent.Parent.controls.Visible = true
script.Parent.Parent.controls.frame1.Visible = true
script.Parent.Parent.controls.control1.Visible = true
script.Parent.Parent.controls.control2.Visible = true
script.Parent.Parent.controls.control3.Visible = true
script.Parent.Parent.Updates.Visible = false
else
script.Parent.Visible = true
script.Parent.Parent.TextButton.Visible = true
script.Parent.Parent.controls.Visible = false
script.Parent.Parent.controls.frame1.Visible = false
script.Parent.Parent.controls.control1.Visible = false
script.Parent.Parent.controls.control2.Visible = false
script.Parent.Parent.controls.control3.Visible = false
script.Parent.Parent.Updates.Visible = true
end
end)

#

disable reset?

#

how?

errant sun
#

What about script.Parent.Visible = false

#

Make a localscript inside

#

StarterGui

#

Game:GetService("StarterGui"):SetCore("ResetButtonCallBack",false)

#

It will optomise your scripts

slow vault
#

hm?

#

really?

errant sun
#

Ye type it

slow vault
#

ok i will

errant sun
#

It prevent players reseting

#

It will reset all your gui progress per death and reset

slow vault
#

isnt that a bad thing?

errant sun
#

Wait

#

Can u make a script

#

Um

#

Opening console = disabling log

slow vault
#

What?

errant sun
#

I mean it cause lags

#

Alot of lags

#

You really need to optimise scripts

#

Like Ui

slow vault
errant sun
#

I recommended you to use inputended

#

InputEnded

slow vault
#

where would i use inputended

errant sun
#

Ok

#

It will be too hard

#

Wait

slow vault
#

ive only been scripting for about a week i am so sorry if i am supposed to know this by now

errant sun
#

Did u make a space by scripts?

#

It look like

slow vault
#

between locals and stuff?

errant sun
#

No

#

I mean in code stroke

slow vault
#

um

errant sun
#

I can try to test in rb studio

#

Imma make a gui and type your script

#

Then recover it

slow vault
#

tysm

#

but what is code stroke????

errant sun
#

Script.parent.Controls.Enabled = false
-Stroke
Script.parent.YouKnow

#

Did u put that

#

Make it easier

#

Do stroke without space

#

It will look easier

slow vault
#

i dont know what a stroke is can you show me an example?

errant sun
#

I already showed

slow vault
#

like, in a script example

errant sun
#

You put 1 space between second bool

#

I mean
Script.parent.Controls.Enabled = false
-Space(Mistake)
Script.parent.Console2.Visible = true

slow vault
#

oh

#

like gaps?

errant sun
#

Optimizing

slow vault
#

i mean i guess i do it

errant sun
#

Script.Parent.Controls.Enabled = true
Script.parent.Controls2.Enabled = true

#

In my game it will take less game

slow vault
#

a lot of my scripts have gaps but idk why i put them there just looks better tbh

errant sun
#

Ok

slow vault
#

more organised i guess

errant sun
#

So now i will starting makeing a gui

slow vault
#

i can upload my gui to roblox, right

dapper abyssBOT
#

studio** You are now Level 3! **studio

slow vault
#

?

errant sun
#

Sure

slow vault
#

ok

errant sun
#

Make a folder and send

slow vault
#

yes

errant sun
#

Then type it

#

How you name it

slow vault
#

main menu GUI NEW

#

wait no its Main Menu GUI NEW

errant sun
#

And your nickname

slow vault
#

Http_BlueGamer

errant sun
#

It will harder to find

#

Ok

slow vault
#

i think its the only thing ive ever uploaded

errant sun
#

I will find you in roblox studio

#

Sometimes im smarter than i think

#

I will find your model by your nick instesd of searchjng your inventory

slow vault
#

oh ok

#

go to my inventory, then to models, and it would be the first one

#

this is what my gui looks like

#

ignore green bar, thats stamina gui

errant sun
#

I cant find your nickname

slow vault
#

its my roblox user

#

i dont change nickname ever

errant sun
#

It hastags

#

Can u send link to you

slow vault
#

oh

#

yea sure

errant sun
#

Republish your models

slow vault
#
#

it is in my inventory. first model

errant sun
#

This item is not for sale

slow vault
#

so basically , the most important fix i need for the gui right now is that when you press the keybind for EITHER updates or controls, they will make the buttons disappear

#

oh ok one sec let me chec kit

errant sun
#

You forgor to make it publish ☠️

slow vault
#

'unknown error2?

#

error*

#

bruhhh

errant sun
#

Bruh

#

☠️

#

I looked at gui

slow vault
#

whats wrong with it?

errant sun
#

You need to change font

slow vault
#

huh?

errant sun
#

When you hover mouse to button it changes font

slow vault
#

it doesnt for me...

errant sun
#

Really hard to look which hotkey to open a gui for the first time

#

Ok

#

So

#

Now i need model

slow vault
#

for me it just makes it slightly brighter on the edges

#

and dimmer around the letters

#

when i hover over

errant sun
#

Forger ☠️

slow vault
#

oh ok

errant sun
#

Better give model

#

Or i will make an example model

slow vault
#

how do i give model in another way??

errant sun
#

Publish it

slow vault
#

i just tried and it didnt work remember

errant sun
#

Cool

slow vault
#

what about publish as plugin?

errant sun
#

Bruh

slow vault
#

sorry was i supposed to click that first...

errant sun
#

I dont wanna ask how you publish it

slow vault
#

ok now its publish my bad sorry ive never uploaded anything before

errant sun
#

Sadly

#

Doesnt work

slow vault
#

wait what

#

whats wrong with it?

errant sun
#

Did u use distrivute on marketplace

slow vault
#

ya

#

of course

errant sun
#

Very bad

slow vault
#

what why

errant sun
#

Ok imma tryna make a gui example for myself

#

I cannot take it because not for sale

slow vault
#

whaaaaaaaat

errant sun
#

So i make a hotkeys

dapper abyssBOT
#

studio** You are now Level 8! **studio

errant sun
#

☠️☠️☠️☠️

slow vault
#

hm ok

dapper abyssBOT
#

studio** You are now Level 4! **studio

slow vault
#

i dont see why it dont work for u tho

#

as in

#

the model

errant sun
#

It works for you because ur owner of this model and it already clained at your inventory

slow vault
#

click install and bish bash bosh

#

no i just logged into my alt account and it work

errant sun
#

Bish bash bosh works not for my 1 account

#

Check on oth acc

slow vault
#

it worked..

errant sun
#

As plugin??

#

I installed it

slow vault
#

it installed but idk how u insert them

errant sun
#

Br

slow vault
#

o i just figured out how

errant sun
#

K

slow vault
#

oh my

#

youre right

errant sun
#

God

slow vault
#

doesnt work :/

errant sun
#

Bruh

#

☠️

#

Only on Oklahama

slow vault
#

i thought it would work lol

errant sun
#

☠️

#

Y

slow vault
#

hm

#

maybe there is a workaround?

errant sun
#

I d k

slow vault
#

oh no

#

i forgot to save before i clicked install

errant sun
#

Of course

slow vault
#

no i mean i forgot to click save on my map i was making

#

and it closed the window

errant sun
#

Bruh

slow vault
#

will i lose my progress?

errant sun
#

I think you need to fix guis more

#

Yes

#

Dont worry

slow vault
#

thank god

slow vault
errant sun
#

I need fix hotkeys

#

O, U

slow vault
#

hahaha why??

errant sun
#

Bc u said thaf

#

That

slow vault
#

yeah

errant sun
#

Or you fixed that

slow vault
#

thats the hotkeys

#

the hotkeys was always O,U

errant sun
#

O

slow vault
#

ok soo i wonder if it DID autosave

errant sun
#

Ye

slow vault
#

yay

#

ur right

errant sun
#

O

#

Shinei

slow vault
#

so now how do i publish properly

errant sun
#

RBclick to Gui - Save To Roblox - Distribute to marketplace

slow vault
#

u said distribute to marketplace is bad

errant sun
#

No

#

It will make it publish

slow vault
#

uplaoded

errant sun
#

YEES

slow vault
#

its gettable aswell

errant sun
#

Finally

slow vault
#

but what was the difference?

errant sun
#

Im waiting for it 4 no 5 houndreds years

slow vault
#

that was basically the same thing i just tried to do

#

and now it works?? 💀

errant sun
#

Only on Oklahama

slow vault
#

HAHHA

errant sun
#

I finnaly get it

slow vault
#

yes

#

dont be too impressed its not like its pro level or anything 💀

errant sun
#

Kids in my basem... helps me to solve this porblem

slow vault
#

hahahahah

#

heres the camera that goes with gui

errant sun
#

Tnx

#

But i dont need it

#

I wanna look at problem

slow vault
#

yea but it goes with the menu...

errant sun
#

S 🤡

#

Forgor ☠️☠️

slow vault
#

script might not work without it + if you are going to remake the script, you would need the camera for the script to be accurate for me too

slow vault
errant sun
#

Forgor*

#

☠️☠️☠️☠️

#

No

#

NOOOO

slow vault
#

LOL

errant sun
#

Forgor is here

#

I forgor how ☠️

slow vault
#

oh no i almost forgor about him

#

well i guess we are both very forgerrable

errant sun
#

Nice musix

#

Music

slow vault
#

thnx i didnt make it myself.

errant sun
#

Uis dont work

slow vault
errant sun
#

☠️

slow vault
#

not clickable no

errant sun
#

Scary

slow vault
#

put in startergui

#

and camera in workspace

errant sun
#

Ok

slow vault
#

keycode for controls : O

#

keycode for Updates : U

errant sun
#

Not working

slow vault
#

keycode for Play : click it

#

wdym

errant sun
#

Click works but hotkeys not

slow vault
#

are all the scripts there??

errant sun
#

Ye i think

slow vault
#

should be 3 scripts

#

odd

#

ill try on my alt

errant sun
#

Now work

#

Everything working correctly

#

I dont know whats the problem

slow vault
#

lol must just take time to load

errant sun
#

I can walk during menu

#

I found very interesting thing

#

When you're in menu,you can tap any button and then console panel will close

#

Looks correctly but

slow vault
#

YEAH

#

IK

errant sun
#

Idk whats the problem

slow vault
#

so weird

#

wait what

errant sun
#

So now i will upgr it

errant sun
#

Forger

#

☠️

slow vault
#

not this time

#

what is i must know

errant sun
#

Controls i mean

#

Instead of console

slow vault
#

oh yes

#

i noticed that too

#

weird, huh.

errant sun
#

Like i think

#

Else make every keyb close this gui

#

Imma try test something

slow vault
#

its weird

#

because

#

when u press any key, the controls and update closes

#

i dont understand it either

#

oh i just realised

dapper abyssBOT
#

studio** You are now Level 5! **studio

errant sun
#

I will remake

slow vault
#

now this is weird

errant sun
#

This gui

slow vault
#

the camera, for some weird reason, wont let me move

errant sun
#

Theres alot od erroes

slow vault
#

oh

errant sun
#

Errors

slow vault
#

oh ok tysm man

#

i have been stuck doing this for ages

errant sun
#

Finished

#

Rember

slow vault
#

ayy

errant sun
#

That's all for now

slow vault
#

ill see how well it work 1 sec

errant sun
#

I added some effects like color change,border

#

I fixed something

#

Like now buttons fixed

#

And J button close Console and Controls

#

And gets back to main menu

slow vault
#

oh

#

damnn

#

it is perfect

#

only one question

errant sun
#

Play bug

#

?

slow vault
#

nono

#

so you know how i had the camera before..?

errant sun
#

Yes

slow vault
#

and it works fine for me but doesnt work when i upload idk why

#

how do i get it compatible with this new gui?

errant sun
#

Dt

#

?

slow vault
#

so like before u click play you see through the camera like before

errant sun
#

J to close consoles

#

Idk but why i dissapear when clicked play

slow vault
#

i dont know what you mean

errant sun
#

Everyt fine?

slow vault
#

oh

errant sun
#

Bc it will take alot of time

#

Did u see color change buttons

#

Or sound effects

slow vault
#

nope

errant sun
#

I also add border animation appearing and dissapeaeing

slow vault
#

oh

errant sun
#

I perfect optimised for mobile or gamepad

slow vault
#

i see colour change now

#

but not the animations

#

so how do i add camera?

errant sun
#

No more bugs

#

Idk lol

#

Forgor

slow vault
#

damn

#

forgor

errant sun
#

I forgor add camera?

slow vault
#

so like

errant sun
#

You can get it back

slow vault
#

how

errant sun
#

So now im tired

#

So now we end

#

And

slow vault
#

aw man

#

ty btw

errant sun
#

Ye

slow vault
#

OH i see

errant sun
#

Forgot about xamera

slow vault
#

you have the camera in the GUI

errant sun
#

Ye

slow vault
#

all i gotta do is insert it lol

errant sun
#

Ok

#

Forgot it

slow vault
#

ty bro

errant sun
#

But rember and do not forgor it! 🤐
I have kids in my basement 🍆💀
ONLY in Ohio ☠️☠️

slow vault
#

lol