Backpack, PlayerGui and PlayerScripts are shown in autocomplete but aren't keys of Player, causing type errors

Player.Backpack, Player.PlayerScripts and Player.PlayerGui are shown in script autocomplete despite not truly being properties of Player, which causes type errors with Luau analysis. Interestingly none of these appear in autocomplete with the new solver (using FFlagDebugLuauDeferredConstraintResolution) which may also be caused by this.

local function _(player:Player): any
	return player.Backpack and player.PlayerGui and player.PlayerScripts
end

Expected behavior

Either the type error is suppressed (possibly causing false positives in rare cases) or the “properties” don’t appear in autocomplete.

1 Like

I also have this issue with class frame when try to get Thier children it scripts also run and it also random appears in scripts what doesn’t have this error before

Thanks for the report! I filed a ticket in our internal database.

1 Like