platforms = {}
for key, value in pairs(Enum.Platform) do
platforms[value] = key
end
script.Parent.Main.UsersPlatform.Text = "Platform: "..platforms[Enum.Platform]
This doesn’t work with other enums either… disregard.
I’ve done this before but it seems that only corescripts can get the platform, so I suggest locally seeing if the touchpad is enabled, the gamepad is enabled ,or the keyboard is enabled, through something along the sorts of this
local mobile = game:GetService('UserInputService').TouchEnabled
local cconsole = game:GetService('UserInputService').GamepadEnabled
local desktop = game:GetService('UserInputService').KeyboardEnabled
and then perhaps using those, if youd want it to be serversided, maybe you could see which one is true, and which are false, so you can use events that fire to the server, telling the server what platform you’re on, and then managing your tags above your head from the serverscript rather than the localscript ((if its tags above the head you’re worried about))
---lets say you're checking if player is on mobile
if mobile == true then
youreventhere:FireServer("Mobile")
end
True, true, i figured to post a solution ive used once before, and since someone has already helped wit hthe topic, i thought i’d somehow try to provide a secondary solution to the thing they were trying to do.