Check if player uses Roblox Player or Windows Version

Hello, does someone know how to check if a player uses the roblox player or the windows app to play my game. i saw a different game doing this but still dont know how.

If someone knows, would be very nice to share with me :slight_smile:

Edit

The Soloution i marked worked great. I just changed some stuff

local version = Version()

local isRobloxPlayer
local isWindowsApp
print(version)

if version == "0.652.0.65.20764" then
	print("Roblox Player")
elseif version == "2.652.762" then
	game.Players.LocalPlayer:Kick("\n\nWE HIT A ROADBLOCK\nYou can only join through Roblox Player \n(Web Version)")
end

Once Roblox Updates, you have to get both new version ids and update/replace them.

2 Likes

The Version() function returns the current Roblox version, they are different in roblox player and the windows app.

Windows App
image
Roblox Player
image

local version = Version()

local isRobloxPlayer
local isWindowsApp

if version:sub(1,1) == "0" then
	isRobloxPlayer = true
elseif version:sub(1,1) == "2" then
	isWindowsApp = true
end
2 Likes

I don’t recommend using this since it’s not a viable long term solution (once Roblox hits release notes 1000, your script will break)

2 Likes

Im going to try this in a few hours, ima mark it as soloution if it works

1 Like

would update the script frequently every update.

1 Like

I will add: my statement only applies if release notes 1000 looks like 1.000.1000xxx and not 0.1000.1000xxx

2 Likes

Roblox Player or Windows version … what do you mean by this?
If you’re asking about PC or not, the latter would have a touchscreen.

untested

local player = game:GetService("Players").LocalPlayer
local userInputService = game:GetService("UserInputService")

local isRobloxPlayer = userInputService.TouchEnabled
local isWindowsVersion = not isRobloxPlayer

if player and player.PlayerGui then
    if isRobloxPlayer then
        -- Roblox Player
    elseif isWindowsVersion then
        -- Windows Version
    end
end

1 Like

The version number changes with each update. If the first number changes for the Roblox Player (or either one), then their solution would stop working

1 Like

Hmm… how about doing this…

local version = Version()
if version:find(":") ~= nil then
    -- Windows App
else
    -- Roblox Player
end

1 Like

I think one way to check for this is by checking if the client is using the 32bit version of Roblox by printing table addresses:
https://devforum.roblox.com/t/byfron-required-place/2544853/31

1 Like

Hey there, thanks for the reply.
I tried using this script but it doesnt work unfortuantly anymore.
It only prints me 64x out everytime on Windows App and Web Version.

There is a Windows App Version that you can get from the Microsoft Store, this version is completly different from the Roblox Player that you install through the website.

I’m looking at two possible strings that are returned, if that is right…
One has a timestamp, so it has a : in it. That one would be the Windows app.
So search for a : … no matter the verson changes it wouldn’t matter to that.

1 Like

Thanks for the reply, i have found a soloution and edited my post :+1:

Just came to say that 32-bit builds have been fully phased out, this is why you are always getting 64-bit.

2 Likes

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