When I test my game on mobile, the Text in the GUI Buttons stay the same size but the Button itself gets smaller. The buttons also seem to lose parts of their outline. On larger devices, the entire GUI goes slightly off screen. I have tried GUI Scaling and changing offset to 0 and i have tried Aspect Ratio constraints (I am using both of these together at the moment.) Any help would be greatly appreciated, below are some images of the problem.
Thanks! -Noob0844
Ok so you can use UserInputService to do this:
local UserInputService = game:GetService("UserInputService") if UserInputService.TouchEnabled == true then --write your positioning code here --i.e. button.Position = UDim2.new(0,0,0,0) elseif UserInputService.GamepadEnabled == true then --XBox elseif UserInputService.KeyboardEnabled == true then --pc,Mac elseif UserInputService.VREnabled == true then --VR end
Just an example. Insert this as a LocalScript in the GUI or if you already have one in the GUI, put it into that.
Happy to help, b_mni.
Try using anchor point and try setting the position on the X and Y axis, not the offset. This means that in any device, the positions will work the same as it will work for you.