isFullscreen() works in only studio but not the game client

I basically modified some code from the ROBLOX Developer wiki. It’s supposed to change a textbox/textbutton/textlabel’s text. When i tested this script in studio, it works. But if you test it in the game client, it somehow doesn’t work.

Studio Screenshots

Full PC studio screenshot:

Fullscreen studio screenshot:

ROBLOX Game Client Screenshots

Full PC ROBLOX Screenshot


Fullscreen ROBLOX Screenshot

The script (which was modified from the ROBLOX Developer Wikia)

-- i literally modified the code from the dev wiki, heres a link to the original: https://developer.roblox.com/en-us/api-reference/event/UserGameSettings/FullscreenChanged
local GameSettings = UserSettings().GameSettings
local fullscreentext = script.Parent

local function checkFullScreenMode()
	local inFullscreen = GameSettings:InFullScreen()
	if inFullscreen then
		fullscreentext.Text = "x Fullscreen    "
	else
		fullscreentext.Text = "Fullscreen    "
	end
end

checkFullScreenMode()
GameSettings.FullscreenChanged:Connect(checkFullScreenMode)

Is there any way of fixing this? Or am i doing something wrong?

I suppose it’s a bug since it works in the studio. Do you enter the full screen in the studio mode or the game mode?

I just ran the code sample from the DevHub and it works fine for me.

Client:
image

Studio:
image

Are there any console errors? Double check that you’re actually in full screen.

when i press f11 in the game client, it doesn’t change the text to “x Fullscreen”. in studio, it somehow does change the text

no, there is nothing in the game client, not even in studio


(this is the script’s name)

That should indicate that there is probably nothing wrong with your code. Are you sure you’re in fullscreen mode in the game client?

yes. i pressed f11 and the text doesn’t change to “x Fullscreen”

First, I would double-check that you have the code in a client-sided LocalScript. Other than that, I don’t know how else to help here other than recommending that you file a bug report. It works perfectly fine for me.