Issues with my GUI Buttons

Hello devforum users,

I have been having an annoying weird issue with my Play button and Quit button


so I don’t know what is going on but when i test it in studio it works perfectly fine and then when I open the game itself and try to click on play and quit they don’t work at all and then I moved my mouse a bit away from the Play button and then I clicked it and it worked

this is where i clicked and it worked


I am not sure if this is my GUI’s problem or something else but i would like some help here and no its not my scripts they are perfectly fine

quick note: I used UIListLayout and some code that increases buttons size slightly on hover but I don’t suspect that these are the issues since stats and credits buttons work

also don’t come at me and say wrong category in a rude way this is my first topic posted on devforum lol

Are you using the offset instead of scale for the Ui? Try making the button visible in studio, then test in-game, so you can see if the button is being moved.

i guessed it could be offset so i set it to 0 and set scale to 0.15 but it didnt fix anything and the buttons work in studio as i said
image

i tried turning off all of my tabs like explorer properties, etc and it still works in studio just so i can make sure its not some position problem, i have never experienced something like this before

heres videos for both studio and in-game

Studio:

External Media

In-Game:

External Media

dont judge quality or frame rate pls my laptop aint that good for recording

Hi, you can upload .mp4 directly to Devforum rather than forcing us to download it externally using a third-party website.

Anyways, could you please tell us if there are errors in the console when in-game?

1 Like

max upload limit reached and the 3rd party website is Streamable so dont worry

No not at all just check my videos

I did check the videos, you did not show your console in-game.

1 Like

i said theres no errors but okay ill show my console

here:

im going to sleep if someone finds a solution lmk however ill try to redo the buttons and its code

The problem is most likely the way you created the UI. When designing the UI, you were using the studio’s viewport which is why the buttons work when you test in studio. When you test in the experience, you are using a different sized viewport frame which is making the buttons stretch and not align exactly as it was in the studio. You can fix this by creating the UI a different way. I suggest not using any text labels or UIListLayout, only use 4 separate text buttons.

1 Like

It could be because of the code that makes my ui size increases whenever my mouse enters the button area, which creates this nice effect and it affects other buttons because they all in a ui list but ty I’ll mark this as solution I will redo them again and see if it works this time because this is so new and weird for me i never saw this before

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.