Hi
Edit:
the best and most effective way to have different Guis for different devices. I already know that you can use if statetements (look at code below) but, is there any other better way than doing that?
Is this relevant: (?) https://developer.roblox.com/en-us/articles/cross-platform-development
Hi
So, my question is pretty straight forward. How would I have different GUIs for different devices?
So what is the easiest way to, for example, change all GUIs in the game, or add something to different things, and then change the GUI according to what device they are using. So, the xbox buttons are marked with “A”. “B” etc etc. (like the controler buttons). And PC displays shortcut buttons, while phone does not etc.
And also, on tools, I have a magic wand, and I want there to be touch buttons for phone, but not for PC. And I want it to show buttons for Xbox etc.
Currently, the way I have done it for the magic wand tool. Is this:
if UIS.TouchEnabled and not UIS.KeyboardEnabled and not UIS.MouseEnabled and not UIS.GamepadEnabled and not GuiService:IsTenFootInterface() then
mobileGui.Enabled = true
elseif GuiService:IsTenFootInterface then
xboxGui.Enabled = true
else
pcGui.Enabled = true
end
(This is like, halfway pseudo code - but you get what I mean)
Is this the way to do it, or? Since I found this tutorial:
https://developer.roblox.com/en-us/articles/cross-platform-development
But I don’t know if it is relevant, and I didn’t understand it. So, what is the best way to do stuff like this, “quick and easy”, so it doesn’t get so messy. Is there any central way if you get me.
Thanks alot! Looking forward to your answer!