I want to make long lasting code / UI that I don’t have to update as Roblox updates. If Roblox were to in the future update their GUI for touch screens, I don’t want to have to update my code or UI to reflect that.
With that being said, I want to make UI input buttons that will relocate and position around the jump button for mobile and touch screen users. To do so, I want to be able to create buttons that will calculate their ideal position based on existing touch UI.
Is there a service, method, or call I can use to get the jump button and other touch UI positions and sizes? Or maybe some service to create buttons / community resource that makes it easier to do all this haha.
Maybe I’m asking the wrong question and there is a significantly easier way to do this; any input / advice is appreciated!
Hello, I could be very wrong when saying this but I don’t think Roblox has ever changed the scale of the touch controls GUI. Either way I’ll try to help.
There’s three methods I’m aware of however they’re not exactly 100% full proof.
Roblox has modules under PlayerScripts that contains the Modules to the player controls, you could in theory require the Module as it contains the button sizes.
However if Roblox were to ever change the code in the module it could break.
Roblox also has the Mobile GUI visible to the client which you can get the button scale.
Once again, if Roblox were to change the names of the GUI then it would break.
And lastly, there’s community posts out there that show how to make a UI Frame have the scale and position of the button but it’s kind of obvious why this wouldn’t work.
Anyways sorry for the horrible Images and organization, I was in a rush to make this lol.
This is exactly the kind of response I was looking for!
My whole thing is that I want the most foolproof way of auto adapting. The ability to change the game just in case Roblox were to update automatically is the goal.
The player GUI I was aware of, but knew if Roblox ever changed the GUI any wait for child’s or anything that relied on parts of that GUI would no longer work.
The player control module also is regularly updated, so maybe my best bet could be to just copy the player control module into StarterPlayer so it never updates.
Down side is now it will never update…
Thank you for your input!