game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
:SetCoreGuiEnabled() needs to be ran client side. So just put it in a localscript in starterpack/startergui and it will work